Sign Up

Sign Up to our social questions and Answers to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In


Have an account? Sign In Now

Sign In

Login to our social questions & Answers to ask questions, answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Sorry, you do not have permission to add post.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Oraask Logo Oraask Logo
Sign InSign Up

Oraask

  • Write
    • Add A New Post
    • Ask A Question

Oraask Navigation

Search
Ask A Question

Mobile menu

Close
  • Categories
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Dev Tools
    • Online Compiler
    • Base64 Converter
  • Wiki
    • SQL Tutorials
    • Java Tutorials
    • Python Tutorials
    • JavaScript Tutorials
Home/ Questions/Q 74867
Next
In Process

Oraask Latest Questions

Question
Hitesh
  • 0
  • 0
HiteshExplorer
Asked: September 8, 20212021-09-08T18:19:41+03:00 2021-09-08T18:19:41+03:00In: ASP .NET

How to make Swagger Codegen work with .NET core

  • 0
  • 0

I want to integrate swagger codegen into my web API project to explore the swagger codegen feature, host the codegen and pass the JSON/raml form specs to generate client in .net core. Can somebody help with how to do it?

asp .netquestion
1
  • 1 1 Answer
  • 146 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    Related Questions

    • HTTP Error 503. The service is unavailable. IIS: Application Pool stops on website access
    • How to convert bytes to KB,MB, GB in .NET ?
    • No migrations configuration type was found in the assembly
    • How can update the values of a collection using LINQ in ASP.NET?

    1 Answer

    • Voted
    • Oldest
    • Recent
    1. Walaa Mohamed
      Walaa Mohamed Junior
      2021-09-09T22:41:54+03:00Added an answer on September 9, 2021 at 10:41 pm

      to integrate swagger codegen into your web api project you have to install “Swashbuckle.AspNetCore.Swagger” nuget package by following the steps below :

      right click your project and click manage nuget packages and install “Swashbuckle.AspNetCore.Swagger” nuget package

      OR

      right click in dependencies and click manage nuget packages and install “Swashbuckle.AspNetCore.Swagger” nuget package

      Then add the following code into your project startup class

      public void ConfigureServices(IServiceCollection services)

      {

      services.AddControllers();

      services.AddSwaggerGen(c =>

      {

      c.SwaggerDoc(“v1”, new OpenApiInfo { Title = “API”, Version = “v1” });

      });

      }

      public void Configure(IApplicationBuilder app, IWebHostEnvironment env)

      {

      if (env.IsDevelopment())

      {

      app.UseDeveloperExceptionPage();

      app.UseSwagger();

      app.UseSwaggerUI(c => c.SwaggerEndpoint(“/swagger/v1/swagger.json”,            “API v1”));

      }

      app.UseRouting();

      app.UseEndpoints(endpoints =>

      {

      endpoints.MapControllers();

      });

      }

       

       

       

       

        • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp

    Leave an answer
    Cancel reply

    You must login to add an answer.

    Forgot Password?

    Need An Account, Sign Up Here

    Sidebar

    Adv 250x250

    Explore

    • Categories
    • Questions
      • New Questions
      • Trending Questions
      • Must read Questions
      • Hot Questions
    • Dev Tools
      • Online Compiler
      • Base64 Converter
    • Wiki
      • SQL Tutorials
      • Java Tutorials
      • Python Tutorials
      • JavaScript Tutorials

    Footer

    Oraask

    About

    Oraask is a website for developers and software engineers who want to learn new skills, share their knowledge, and solve their coding problems. Oraask provides free content on various programming languages and topics, such as Oracle, Python, Java, etc. Oraask also allows users to ask questions and get answers from other members of the community.

    About Us

    • About Us
    • Contact Us

    Legal Stuff

    • Privacy Policy
    • Terms & Conditions

    Follow

    Oraask is licensed under CC BY-NC-SA 4.0Oraask CopyrightOraask CopyrightOraask CopyrightOraask Copyright

    © 2019 Oraask. All Rights Reserved
    With Love by Oraask.

    Insert/edit link

    Enter the destination URL

    Or link to existing content

      No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.