All Of не работает должным образом в Open API Swagger 3.0. ⇐ JAVA
-
Anonymous
All Of не работает должным образом в Open API Swagger 3.0.
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
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
Мобильная версия