aspnetcore is missing from Codegen Options in SwaggerHub - swagger

for me, aspnetcore is missing from Codegen Options in SwaggerHub.
Am I making some simple mistake?
I just want to generate server stub from existing openapi file.
thank you.

figured out myself - when creating an new API in SwaggerHub, you should go with OpenAPI Version 2.0 , not 3.0 if you want to have Server Stub generation option.

Related

ASP.NET Core Web API : use custom OpenApi specification

I create an API and I would like to use my custom OpenAPI specification for Swagger. Because I go design first. I don't want to generate code from OpenAPI spec; I just want to pass it to Swagger. And I have many separated yml files.
Is it possible?
Thank you
I found it. I have bad set cors... Thanks

NestJS codegen from Swagger API definition

Does anybody know of a way to automatically generate NestJS typescript code from Swagger?
Currently, there are no packages that build a Nest server based on a swagger.json file. Would be a cool project though
Just found a project that claims it can generate Nest.js code from a Swagger / OpenAPI spec file:
         swagger-nestjs-codegen on Github and on npmjs.com
Did not test it yet, though.

How do I modify the status code in a HTTP response in swagger

I have a swagger .yaml file and I am using codegen to create a spring boot application.How can I modify the HTTP response in swagger.
It seems that codegen does not work as you said. This app generates a simple code. I advice you to use the following generator for Spring Boot (named as "Spring MVC"):
https://github.com/BBVA-CIB/APIRestGenerator

Whats the right swagger tool/plugin to generate Swagger 2.0 jsons out of JaxRS annoations which works with ANT?

We use Apache Ant for our project build and were thinking of extending the same for getting swagger 2.0 specs .json generated for our REST API docs. I found an ant task : https://github.com/cstroe/swagger-ant-task
which would invoke the same swagger core maven plugin, but some dependency jars have been changed in the github package due to which I am getting 'No Such Method' Exception for getApiInfo() method in ApiSourceInfo.java.
We cannot use maven just for generating API docs. I needed some help in finding a way by which I can use swagger core tool of generating docs using swagger annotations in the API definition file. Using ant wrapper for the maven plugin was one way but I am not not able to leverage it. Is there any other workaround?
Or to frame it otherwise, whats the right swagger tool/plugin to generate Swagger 2.0 jsons out of JaxRS annoations which works with ANT.
Any suggestion would be much appreciated.
Thanks

Swagger spec in Swagger Core Jersey 1.X

I am using Swagger with Jersey 1. It generates spec in Swagger spec v1.2. Most of the tools out there (e.g. Editor ) require spec v2.0. Is there a way to generate spec v2.0 ?
I actually wanted printable/static docs like bootprint-swagger which also required spec v2.0.
I have not tried it myself, but https://github.com/lucybot/api-spec-converter seems to be able to convert Swagger 1.2 to Swagger 2.0
I'm not sure if it is an "official" Swagger-Tool, but it is just two clicks away from the Swagger-1.2-to-2.0-Migration-Guide, so I guess its like "half-official" at least.
I might try to incoorporate it into bootprint-swagger so that it supports Swagger 1.2 as well. I've just created an issue at github so that it is not forgotten.

Resources