-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
bugConfirmed bugConfirmed bug
Description
🐛 Bug Report
Fastify with fastify-swagger creates invalid swagger schema. It should not contain $id fields.
To Reproduce
https://repl.it/repls/HoarseCoolEditor
And you'll got
...
"paths": {
"/first": {
"get": {
"responses": {
"200": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"a": {
"type": "number"
}
},
"$id": "A"
}
},
"description": "Default Response"
}
}
}
},
}
...Notice the responses.200.schema.items.$id. Swagger generates error like
should NOT have additional properties
additionalProperty: $id
Your Environment
- node version: 8
- fastify version: 2.8.0
- os: Linux
I plan to create PR with fix a bit later
Eomm
Metadata
Metadata
Assignees
Labels
bugConfirmed bugConfirmed bug