-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
I installed the following libraries
chalice==1.28.0
apispec==6.3.0
chalice_spec==0.6.0
pydantic==2.0.3
My initialization code is this:
spec = APISpec(
title='test-with-openapi-v3',
version='1.0.0',
openapi_version="3.0.2",
plugins=[
PydanticPlugin()
]
)
spec.components.schema("CodeSchema", model=CodeSchema)
spec.components.schema("CodesResponse", model=CodesResponse)
my CodeSchema:
class CodeSchema(BaseModel):
id: str
status: str
person: str = 'uuid'
my CodesResponse:
class CodesResponse(BaseModel):
status: bool
message: str
data: List[CodeSchema]
When I validate in https://validator.swagger.io/validator/debug my url
I find this error:
{
"messages": [
"attribute components.schemas.CodesResponse.$defs is unexpected"
],
"schemaValidationMessages": [
{
"level": "error",
"domain": "validation",
"keyword": "oneOf",
"message": "instance failed to match exactly one schema (matched 0 out of 2)",
"schema": {
"loadingURI": "#",
"pointer": "/definitions/Components/properties/schemas/patternProperties/^[a-zA-Z0-9\\.\\-_]+$"
},
"instance": {
"pointer": "/components/schemas/CodesResponse"
}
}
]
}
I was researching and I realized in OpenAPI v3 not support that reference and I would like to know if possible to solve from your side or apisec side?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels