swagger-ui

Actions require unique method/path combination for Swagger

有些话、适合烂在心里 提交于 2021-02-20 06:32:03
问题 I have 2 HTTP GET method in same controller and give me this error HTTP method "GET" & path "api/DataStore" overloaded by actions - DPK.HostApi.Controllers.DataStoreController.GetByIdAsync (DPK.HostApi),DPK.HostApi.Controllers.DataStoreController.GetAllAsync (DPK.HostApi). Actions require unique method/path combination for Swagger 2.0. My Controller : [Route("api/[controller]")] [ApiController] public class DataStoreController : ApiControllerBase { private readonly IDataStoreService

Actions require unique method/path combination for Swagger

和自甴很熟 提交于 2021-02-20 06:30:24
问题 I have 2 HTTP GET method in same controller and give me this error HTTP method "GET" & path "api/DataStore" overloaded by actions - DPK.HostApi.Controllers.DataStoreController.GetByIdAsync (DPK.HostApi),DPK.HostApi.Controllers.DataStoreController.GetAllAsync (DPK.HostApi). Actions require unique method/path combination for Swagger 2.0. My Controller : [Route("api/[controller]")] [ApiController] public class DataStoreController : ApiControllerBase { private readonly IDataStoreService

Enabling Cross Origin Resource sharing (CORS) in ExpressJS framework on NodeJS developed using Swagger

房东的猫 提交于 2021-02-16 17:56:42
问题 I've hosted a nodejs server on localhost generated using Swagger and I'm trying to make API calls to it using Swagger UI again hosted on localhost. The network profile in chrome is showing connection refused everytime I'm making a call because CORS header are not added to the request. This is my app.js file which was generated using Swagger: 'use strict'; var SwaggerExpress = require('swagger-express-mw'); var app = require('express')(); module.exports = app; // for testing var config = {

Enabling Cross Origin Resource sharing (CORS) in ExpressJS framework on NodeJS developed using Swagger

纵然是瞬间 提交于 2021-02-16 17:55:11
问题 I've hosted a nodejs server on localhost generated using Swagger and I'm trying to make API calls to it using Swagger UI again hosted on localhost. The network profile in chrome is showing connection refused everytime I'm making a call because CORS header are not added to the request. This is my app.js file which was generated using Swagger: 'use strict'; var SwaggerExpress = require('swagger-express-mw'); var app = require('express')(); module.exports = app; // for testing var config = {

SpringDoc/Swagger behind an nginx proxy

只愿长相守 提交于 2021-02-11 12:59:01
问题 We are running a service behind an nginx proxy so that: http://service-post:8080/swagger-ui.html is routed to public address https://host.com/services/post/swagger-ui.html Or to define from the other way: When nginx receives request on https://host.com/services/post/swagger-ui.html , it strips the /services/post/ prefix and passes the request to the post service on /swagger-ui.html path. Before setting up anything (with default SpringDoc configuration) I can correctly see the swagger docs on

Swagger isn't working in OWIN Startup Web API C#

无人久伴 提交于 2021-02-11 12:53:28
问题 I've implemented Swagger in the OWIN startup.cs file in my Web API, but when I try to open Swagger UI page it says HTTP Error 404.0 - Not Found URL to check Swagger UI: https://localhost:5001/swagger Here is my implementation, please help me what I'm missing. Startup.cs public class Startup { public void Configuration(IAppBuilder app) { app.Map("/api", map => { ConfigureApiArea(map); }); } private void ConfigureApiArea(IAppBuilder map) { var config = CreateTypedConfiguration<BaseApiController

Swagger UI doesn't support uploading a file properly for RestEasy

╄→尐↘猪︶ㄣ 提交于 2021-02-08 10:18:33
问题 I use a JAX-RS (RestEasy) along with a Swagger. One of my endpoint can upload a file. Defined way to upload the file (in RestEasy) is to provide a org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput as a parameter. Here is my endpoint: @PUT @Path("/apis/{id}/file") @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(MediaType.APPLICATION_JSON) @ApiOperation(value = "Registers a file.", code = 201, nickname = "registerFile") @ApiResponses( value = { @ApiResponse(code = 201,

Swagger UI doesn't support uploading a file properly for RestEasy

◇◆丶佛笑我妖孽 提交于 2021-02-08 10:16:34
问题 I use a JAX-RS (RestEasy) along with a Swagger. One of my endpoint can upload a file. Defined way to upload the file (in RestEasy) is to provide a org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput as a parameter. Here is my endpoint: @PUT @Path("/apis/{id}/file") @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(MediaType.APPLICATION_JSON) @ApiOperation(value = "Registers a file.", code = 201, nickname = "registerFile") @ApiResponses( value = { @ApiResponse(code = 201,

Asp.NET Core 2.2: Swagger endpoint specific security definition

可紊 提交于 2021-02-08 05:37:22
问题 I am using Swashbuckle.AspNetCore 5.0.0-rc2 in one of my .Net Core 2.2 REST projects. Within my project I am serving two different apis which are logically connected to each other. Today, I managed to seperate my swagger documentations to have one swagger endpoint per api containing only the corresponding api controllers. I managed to do this by adding a specified group name to the api explorer settings of the controllers: [Authorize(AuthenticationSchemes = JwtBearerDefaults

How do I make Swagger-UI use a YAML/JSON rather than having to put annotations on my REST controller?

一笑奈何 提交于 2021-02-07 18:25:57
问题 I am used to adding annotations on my REST controllers for Swagger-UI to use. However, I would prefer to point Swagger-UI at a YAML file which describes my REST controller. An example of what I want to do is shown below. (Springfox/Swagger2) DemoApplication.java import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class DemoApplication { public static void main(String[] args) { SpringApplication