apib2swagger
apib2swagger copied to clipboard
Content-Type application/scim+json isn't creating a corresponding "consumes" section
I'm using v1.16.1, and have some apib like this:
### Create a user [POST /api/scim/v2/Users]
+ Request
+ Headers
Content-Type: application/scim+json
Authorization: Bearer token
+ Body
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"userName": "fredsmith",
"name": {
"givenName": "Fred",
"familyName": "Smith"
},
"emails": [
{"primary": true, "value": "[email protected]", "type": "work"}
],
"displayName": "Fred Smith",
"externalId": "fred-external-id",
"active": true
}
+ Response 201 (application/scim+json)
+ Attributes (ExistingUser)
When producing the swagger json, it creates a produces section, but not consumes, which then causes a UI viewer to default (I'm assuming) to application/json for "content type" and "request body schema". If I add the consumes section myself, it displays correctly.
"produces": [
"application/scim+json"
],
"consumes": [
"application/scim+json"
],
Thank you!
I have released v1.17.0 to support consumes for swagger 2.0. Please confirm it, thank you!
Works perfectly. 🚀 Thank you so much! 🙏