-
Notifications
You must be signed in to change notification settings - Fork 371
Closed
Description
I don't want terms of service, contact, license
fields in info
of my api-documentation output. Why are these fields generated ? I am using open_api
format for documentation.
open_api.yml
swagger: '2.0'
info:
title: My title
description: My API documentation
version: 1.0.0
schemes:
- https
consumes:
- application/json
produces:
- application/json
host: ""
Produced output:
{
"swagger": "2.0",
"info": {
"title": "My title",
"description": "My API documentation",
"termsOfService": "http://open-api.io/terms/",
"contact": {
"name": "API Support",
"url": "http://www.open-api.io/support",
"email": "[email protected]"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "1.0.0"
}
}
Expected output:
{
"swagger": "2.0",
"info": {
"title": "My App",
"description": "My API documentation",
"version": "1.0.0"
}
}
Temp fix:
I've monkey-patched RspecApiDocumentation::OpenApi::Info
class and hardcoded the info
json:
class RspecApiDocumentation::OpenApi::Info
def as_json
{
title: "My App",
description: "My API documentation",
version: "1.0.0"
}
end
end
Metadata
Metadata
Assignees
Labels
No labels