-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Hello!
I encountered a weird problem when converting a blueprint that has data structure with Include (which is mixin type) in the spec, but then it seems to be ignored in the component schema.
For example, given this apib:
# Test API
# Data Structures
## `Person` (object)
- first_name (string, required)
- last_name (string, required)
## `Member` (object)
- uid (string, required)
- Include `Person`
# Group Members
## Member Registrations [/accounts/register]
### Submit Registration [POST /accounts/register]
Register a user
- Request (application/json)
- Attributes (Person)
- Response 201 (application/json)
- Attributes (Member)The API result seems to be okay, but the component schema "Member" does not refer to "Person" at all, so it's missing the first_name and last_name.
{
"openapi": "3.0.3",
"info": {
"title": "Test API",
"version": "1.0.0",
"description": ""
},
"paths": {
"/accounts/register": {
"post": {
"responses": {
"201": {
"description": "Created",
"headers": {},
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"uid": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
}
},
"required": ["uid", "first_name", "last_name"]
},
"example": {
"uid": "",
"first_name": "",
"last_name": ""
}
}
}
}
},
"summary": "Submit Registration",
"operationId": "Submit Registration",
"description": "Register a user",
"tags": ["Members"],
"parameters": [],
"requestBody": {
"content": {
"application/json": {
"example": {
"first_name": "",
"last_name": ""
},
"schema": {
"type": "object",
"properties": {
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
}
},
"required": ["first_name", "last_name"]
}
}
}
}
}
}
},
"components": {
"schemas": {
"Person": {
"type": "object",
"required": ["first_name", "last_name"],
"properties": {
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
}
}
},
"Member": {
"type": "object",
"required": ["uid"],
"properties": {
"uid": {
"type": "string"
}
}
}
}
},
"tags": [
{
"name": "Members"
}
]
}Do I miss something or the converter simply unaware about mixins?
Metadata
Metadata
Assignees
Labels
No labels