Ask a Question

Swagger code gen integration to Asp.net MVC application

Maktum_pasha
New Contributor

Swagger code gen integration to Asp.net MVC application

Hi Team,

 

I have requirement of client code generation using swagger by passing the Json file as an input.

My application is a web base application built using Asp.net MVC, we are rendering the API's using Json spec file.

Now I want some feature like, when I choose language from drop down button on the page, I need to generate the client stubs for that particular language

(please refer the attachment).

is there a API that I can make a call by passing the Json file as input ?

any helps will be much appreciated.

 

Thanks 

Maktum 

3 REPLIES 3
ponelat
Staff

Re: Swagger code gen integration to Asp.net MVC application

Hi @Maktum_pasha 

 

Yes, there is an API for generating code where you can provide the OpenAPI (JSON or YAML) as input, along with configuration options.

For OpenAPI 3.0: https://generator3.swagger.io/

For OpenAPI/Swagger 2.0: https://generator.swagger.io/

Maktum_pasha
New Contributor

Re: Swagger code gen integration to Asp.net MVC application

I need the Api end point details so that I can call the Api from my code directly.

ponelat
Staff

Re: Swagger code gen integration to Asp.net MVC application

HI @Maktum_pasha 

The links above point to SwaggerUI instances with those API details...

ponelat_0-1634197308211.png

Or the direct link to the OpenAPI definition https://generator3.swagger.io/openapi.json

Eg: POST https://generator3.swagger.io/api/generate

cancel
Showing results for 
Search instead for 
Did you mean: