You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case post the parsing the anyOf schemas becomes #/components/schemas/adoption_request_for_bird but the disciminator mapping still remains as ../components/schemas/adoption_request_for_bird.json. However the same works for OneOf.
Callback Ref issues:
{
"{$request.body#/callback_url}/start": {
"put": {
"summary": "Does a callback",
"description": "You know what it does",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "../../../schemas/payload.json"
}
}
}
},
"responses": {
"204": {
"description": "Your server implementation should return this HTTP status code if the data was received successfully."
}
}
}
}
}
In this case the payload schema is incorrectly searched from the openapi.json base path instead of the relative path from the callback. Also this (looking in base path instead of relative path) seems to occur for parameter examples too.
The text was updated successfully, but these errors were encountered:
The relative refs issue in callbacks & parameter examples can be worked around by changing the ref path to be relative from base directory, instead of current directory.
But the Discriminator mapping ref issue breaks codegen, it is not able to resolve the Type. And creates some ERRORUNKNOWN class and compilation fails.
anthochristen
changed the title
Discriminator refs & callback refs not processed
Discriminator mapping refs (anyOf) & callback refs not processed
May 1, 2024
When relative paths are used in discriminator mappings (anyOf) & callbacks the references are not processed.
Discriminator Mapping Ref sync issue:
In this case post the parsing the anyOf schemas becomes
#/components/schemas/adoption_request_for_bird
but the disciminator mapping still remains as../components/schemas/adoption_request_for_bird.json
. However the same works forOneOf
.Callback Ref issues:
In this case the
payload
schema is incorrectly searched from theopenapi.json
base path instead of the relative path from the callback. Also this (looking in base path instead of relative path) seems to occur for parameter examples too.The text was updated successfully, but these errors were encountered: