-
Notifications
You must be signed in to change notification settings - Fork 9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't show second level subtypes of response class #703
Comments
Need some more info. Is this Swagger 1.2 or 2.0? Do you have an existing swagger json? If so, can you share it? |
Hi @webron, the swagger version is 1.2 and this is my model {
"Product": {
"type": "object",
"id": "Product",
"required": [
"Id",
"Name",
"CategoryId"
],
"properties": {
"Id": {
"type": "integer",
"format": "int32"
},
"Name": {
"type": "string"
},
"CategoryId": {
"type": "integer",
"format": "int32"
},
"ImageUrl": {
"type": "string"
},
"Type": {
"type": "string"
}
},
"subTypes": [
"Shoe"
],
"discriminator": "Type"
},
"Shoe": {
"type": "object",
"id": "Shoe",
"required": [
"Size"
],
"properties": {
"Size": {
"type": "integer",
"format": "int32"
}
},
"subTypes": [
"Nike"
]
},
"Nike": {
"type": "object",
"id": "Nike",
"required": [
"NikeId"
],
"properties": {
"NikeId": {
"type": "string"
}
},
"subTypes": []
}
} Product is top class, Shoe inherits Product, and Nike inherits Shoe. |
Hi, this will be supported, but for 2.0 specs. Please track here: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi all,
This is my model
My rest api return BaseModel, for mpoindexter/swagger-js@68ea66f swagger UI can show model of FirstSubType, but I only want swagger UI show model of SecondSubType
Can I do that?
Thanks in advanced.
Thanh
The text was updated successfully, but these errors were encountered: