FAQ Database Discussion Community

Populate API Manager “Documentation and Attachments” tab from Swagger 2.0 definition?

How do I specify items for the "Documentation and Attachments" tab in the API Manager in my Swagger 2.0 definition? ...

Is it possible to define a parameter set and reference it?

I have multiple parameters that I want to reference, but I do not want to specify them one by one. This snippet does not make the parameters show up: { ... "paths": { "/stuff": { "get": { "description": "Gets stuff", "operationId": "getStuff", "parameters": { "$ref": "#/definitions/set1" } } } },...

Automatically import REST APIs from GitHub / via API into API Manager?

Does the API Manager / Bluemix provide an interface (API, hook) to automatically update API definitions when I push Swagger 2.0 API definition changes to a GitHub repository?

How to make a field in a definition required for some operations and not others

I'm writing my swagger definition in yaml. Say I have a definition that looks something like this. paths: /payloads: post: summary: create a payload ... parameters: - in: body name: payload description: New payload required: true schema: $ref: "#/definitions/payload" put: summary: update a payload ... parameters: - in: body name:...

Bluemix API Manager Swagger 2.0 import ignores “formData” variables

In this code, path and query variables are imported, but the form data variable is not. However, (non-IBM) Swagger UI displays it correctly. { ... "paths": { "/stuff/{p}": { "post": { "consumes": [ "application/x-www-form-urlencoded", "multipart/form-data" ], "parameters": [ { "name": "p", "in": "path", "description": "Path variable", "required": true, "type": "string"...

API Manager: Set API icon in Swagger 2.0 definition?

Is it possible to define an API icon in the Swagger 2.0 definition that will be shown on the app developers page? Or is it at least possible to set an API icon in the API Manager UI? I could not find anything related. ...

How to send Authorization header with a request in Swagger UI?

I have a ASP.NET Web Api 2 application. I added Swashbuckle to it (Swagger for .NET). It displays my endpoints no problem, but in order to send a request I need to attach an Authorization header to that request. If I understand correctly in order to do that I need...

Swagger: support for optional routes

I have a route with an optional parameter: [Route("{categoryId?}")] public HttpResponseMessage Get(int? categoryId=null) However, when I don't provide a value for categoryId the call includes {categoryId?} in the request itself... http://myhost/api/%7BcategoryId%7D ...