All Of не работает должным образом в Open API Swagger 3.0.JAVA

Программисты JAVA общаются здесь
Ответить
Anonymous
 All Of не работает должным образом в Open API Swagger 3.0.

Сообщение Anonymous »


In my project I am using Open API 3.0 to for generating mmodel classes.

My requirement is to I have to reuse the parent class attribute to sub class.

Ex:

public class Student { private String id; private String name; } public class Address { private String id; private String name; private String city; private String state; } But the problem is allOf generating the bean class like below instead of above one.

public class Address { public Student student; private String city; private String state; } Below is my schema.yaml

Student: properties : id: type: integer format: int64 description: The ID of the new account name: type: string description: The human-readable description of this account Address: properties : allOf: $ref : '#/Student' city: type: string description: City state: type: string description: State How to make sure the properties are duplicating instead of creating Object.

Any help will be greatly appreciated!!!


Источник: https://stackoverflow.com/questions/691 ... wagger-3-0
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «JAVA»