swagger

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 to provide texts to swagger in a properties file for spring restful service?

牧云@^-^@ 提交于 2021-02-07 20:30:52
问题 I am creating my spring restful service documentation with swagger. Sample request handler method and its documantation below. It works: @ApiOperation(value = "Returns user details", notes = "Returns a complete list of users details with a date of last modification.", response = User.class) public Response getUser(@ApiParam(name = "userName", value = "Alphanumeric login to the application", required = true) @PathParam("userName") String userName) { ... } But I want to provide text of the

How to provide texts to swagger in a properties file for spring restful service?

拥有回忆 提交于 2021-02-07 20:30:15
问题 I am creating my spring restful service documentation with swagger. Sample request handler method and its documantation below. It works: @ApiOperation(value = "Returns user details", notes = "Returns a complete list of users details with a date of last modification.", response = User.class) public Response getUser(@ApiParam(name = "userName", value = "Alphanumeric login to the application", required = true) @PathParam("userName") String userName) { ... } But I want to provide text of the

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

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:09
问题 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

Amazon API Gateway Import From Swagger Error - Not taking Generics

随声附和 提交于 2021-02-07 14:22:44
问题 I'm trying to create new APIGateway via import from Swagger, but having validation errors: The particular class causing the issue is our PaginationModel class. Code model definition: public class PaginationModel<T> { public IEnumerable<T> items { get; set; } public int offset { get; set; } public int totalCount { get; set; } } Swagger file section representing Generic PaginationModel for a particular type: *"PaginationModel[DepartmentUIModel]":{"type":"object","properties":{"items": {"type":

Amazon API Gateway Import From Swagger Error - Not taking Generics

人盡茶涼 提交于 2021-02-07 14:21:35
问题 I'm trying to create new APIGateway via import from Swagger, but having validation errors: The particular class causing the issue is our PaginationModel class. Code model definition: public class PaginationModel<T> { public IEnumerable<T> items { get; set; } public int offset { get; set; } public int totalCount { get; set; } } Swagger file section representing Generic PaginationModel for a particular type: *"PaginationModel[DepartmentUIModel]":{"type":"object","properties":{"items": {"type":

Swagger: Additional properties not allowed: allOf

让人想犯罪 __ 提交于 2021-02-07 10:24:12
问题 I'm trying to figure out this swagger API inheritance stuff by using allOf . This is my swagger yaml file. swagger: '2.0' info: title: Test API version: '1' basePath: /api/v1 schemes: - https produces: - application/json paths: /users: get: summary: Collection of users tags: - users responses: 200: description: A list of Users schema: $ref: "#/definitions/Users" 500: $ref: "#/responses/BadRequest" definitions: User: required: - username properties: firstName: type: string lastName: type:

Swagger: Additional properties not allowed: allOf

匆匆过客 提交于 2021-02-07 10:23:20
问题 I'm trying to figure out this swagger API inheritance stuff by using allOf . This is my swagger yaml file. swagger: '2.0' info: title: Test API version: '1' basePath: /api/v1 schemes: - https produces: - application/json paths: /users: get: summary: Collection of users tags: - users responses: 200: description: A list of Users schema: $ref: "#/definitions/Users" 500: $ref: "#/responses/BadRequest" definitions: User: required: - username properties: firstName: type: string lastName: type: