Generating Swagger for one service only with Swashbuckle - swagger

Is it possible to get the Swagger for an individual endpoint from Swashbuckle? I would like to be able to build individual Swagger documents from each endpoint in my API solution, rather than including all operations in all endpoints.

Related

How to use OpenAPI / Swagger by authenticating endpoints?

We use swagger in our project and while testing endpoints I need to authenticate in Swagger page (https://localhost:5001/api/index.html). As far as I remember, there was a way to copy the jwt of the current session and paste it to request header, etc. But I have not succeeded with this approach. Is there a proper way e.g. using Swagger Inspector as mentioned on How to Perform a Basic API Test In 3 Steps? Or a smarter way?

Is there a provision to import or publish external swagger json/yaml in bloomreach/hippo cms?

The API is hosted outside the CMS and we have swagger JSON/YAML exported fro the API. Requirement is to publish only swagger documentation/spec in Bloomreach/Hippo cms.
Is there an inbuilt capability to directly import swagger json into Bloomreach/Hippo cms and publish the documentation?
I'm sorry you never got a timely answer here. AFAIK there is no ootb functionality for what you want. You can write code to perform this task, either as a service that polls your api or as a rest endpoint where the data can be pushed to. This will have to be translated to a cms document type.

Generating Swagger definition file (JSON or YAML) from springboot REST service

I have implemented AWS API Gateway, which has many API methods. Currently, I have created a swagger definition file (JSON format) and imported this file AWS API Gateway though the "import" option available. I am also developing REST API services in springboot that gets called from the AWS API Gateway. The REST API Service has 20 API methods and I want to have these 20 API Methods in API Gateway. I do not want to manually maintain a Swagger definition file, containing the definition for these 20 API methods. I would like to know if I can generate Swagger definition file from SpringBoot API.
I know that Swagger can create HTML documentation from the REST API but I did not find any tool that could convert this HTML to a Swagger definition file. I also know that Swagger inspector can generate the definition file, but I have to manually call each service endpoints manually to create the definition file.

How can I exclude certain operations/HTTP Verbs with Swagger Codegen?

I'm using Swagger w/ AWS API Gateway. In order to fully support CORS, I have several OPTIONS methods in my swagger file; they exist only to tell API Gateway to return CORS headers so that preflight requests from my Angular app succeed.
However, when I use Swagger codegen to generate the API, all of those OPTIONS methods come across in my service as real methods. I don't want this to be the case.
How can I tell Swagger Code Gen to skip over certain, specific methods; for instance, putting a tag on the OPTIONS methods so that Swagger CodeGen doesn't generate code for those particular HTTP verbs?

Centralised swagger for multiple drop wizard services

I've included swagger bundle in each of my dropwizard service. I was wondering if we can run swagger independently and connect to each service so that user can have a centralised view of all services through one UI.
I'm not aware of something that lets you do that at the moment with Swagger UI specifically, but you might check out DynamicApis.com. They let you host multiple swagger documents and provide some really nice additional value for your APIs as well. They take your Swagger JSON and build you your own API portal out of them. They also have native REST API integration where you can automatically sync up your API to your portal or you can manually upload them.
Here is an example portal they have up to demonstrate how multiple APIs can be hosted and how you see them.
Here is an example of what their documentation for each API looks like. Kind of like Swagger UI++.
You can have multiple swagger instances in a single DW service. The UI, however, does not allow you to point to each of them independently. It's easy enough though to modify index.html to allow the user to select the swagger definitions that you have in the deployment.

Resources