swagger-editor

How to change https://<your-url>/swagger to custom in Swagger

余生长醉 提交于 2020-08-06 12:16:48
问题 I was tasked to install Swagger into Web API project. Installed: most recent version of Swashbuckle from nuget. (Swashbuckle.Core.Net45 and Swashbuckle.Net45) Customized: App_Start\SwaggerConfig.cs. I was able to customize (change styles, added logo, modified descriptions).. Now we need to change from https://[your-url]/swagger to https://[your-url]/help Please advise 回答1: Change routePrefix of SwaggerUIOptions parameter, default is "swagger" 回答2: How about following the documentation? In

Swagger errors shows a need to define a parameter in the path or operation level

僤鯓⒐⒋嵵緔 提交于 2020-07-23 09:40:03
问题 I am getting the error below: Declared path parameter "imageId" needs to be defined as a path parameter at either the path or operation level This is the snapshot of my swagger definition '/api/v1/images/{unitnumber}/{type}/{imageId}': delete: tags: - Images summary: 'Summary' description: "Description" operationId: DeleteImage consumes: [] produces: - application/json parameters: - name: unitnumber in: path required: true type: string - name: type in: path required: true type: string - name:

Swagger errors shows a need to define a parameter in the path or operation level

核能气质少年 提交于 2020-07-23 09:38:05
问题 I am getting the error below: Declared path parameter "imageId" needs to be defined as a path parameter at either the path or operation level This is the snapshot of my swagger definition '/api/v1/images/{unitnumber}/{type}/{imageId}': delete: tags: - Images summary: 'Summary' description: "Description" operationId: DeleteImage consumes: [] produces: - application/json parameters: - name: unitnumber in: path required: true type: string - name: type in: path required: true type: string - name:

Swagger errors shows a need to define a parameter in the path or operation level

亡梦爱人 提交于 2020-07-23 09:37:05
问题 I am getting the error below: Declared path parameter "imageId" needs to be defined as a path parameter at either the path or operation level This is the snapshot of my swagger definition '/api/v1/images/{unitnumber}/{type}/{imageId}': delete: tags: - Images summary: 'Summary' description: "Description" operationId: DeleteImage consumes: [] produces: - application/json parameters: - name: unitnumber in: path required: true type: string - name: type in: path required: true type: string - name:

Swagger Editor 3.8 examples not working for reference array schema

百般思念 提交于 2020-06-01 05:09:05
问题 This question is a follow-up to this similar one - as @Helen requested a new question be asked. It seems an array type schema only accepts "example", not "examples". The following schema produces an error on the editor.swagger.io site: info: title: Example Inc. REST API version 1.0 version: '1.0' openapi: 3.0.0 components: schemas: user_reference: properties: comment: type: string middle_name: type: string domain: pattern: '^[0-9A-Za-z][0-9A-Za-z.-]*$' type: string id: minimum: 1 type:

Swagger Editor 3.8 examples not working for reference array schema

限于喜欢 提交于 2020-06-01 05:09:00
问题 This question is a follow-up to this similar one - as @Helen requested a new question be asked. It seems an array type schema only accepts "example", not "examples". The following schema produces an error on the editor.swagger.io site: info: title: Example Inc. REST API version 1.0 version: '1.0' openapi: 3.0.0 components: schemas: user_reference: properties: comment: type: string middle_name: type: string domain: pattern: '^[0-9A-Za-z][0-9A-Za-z.-]*$' type: string id: minimum: 1 type:

Can the swagger editor online take a YAML url as input through the address bar?

断了今生、忘了曾经 提交于 2020-02-24 20:20:36
问题 I want to access https://editor.swagger.io/ but need the YAML file to be preloaded based on a URL parameter. So if I want to view https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v3.0/petstore.yaml, I should be able to provide this as an input to swagger editor accessible over the internet. Is this possible? 回答1: Yes, Swagger Editor supports the url parameter: http://editor.swagger.io/?url=https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0

Can the swagger editor online take a YAML url as input through the address bar?

廉价感情. 提交于 2020-02-24 20:18:22
问题 I want to access https://editor.swagger.io/ but need the YAML file to be preloaded based on a URL parameter. So if I want to view https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v3.0/petstore.yaml, I should be able to provide this as an input to swagger editor accessible over the internet. Is this possible? 回答1: Yes, Swagger Editor supports the url parameter: http://editor.swagger.io/?url=https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0

Can the swagger editor online take a YAML url as input through the address bar?

天涯浪子 提交于 2020-02-24 20:17:43
问题 I want to access https://editor.swagger.io/ but need the YAML file to be preloaded based on a URL parameter. So if I want to view https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v3.0/petstore.yaml, I should be able to provide this as an input to swagger editor accessible over the internet. Is this possible? 回答1: Yes, Swagger Editor supports the url parameter: http://editor.swagger.io/?url=https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0

Is there any possible way to define same path multiple times with change in parameters?

送分小仙女□ 提交于 2020-02-24 14:40:57
问题 I need to define a service that is used multiple times with change in parameters.I need to define this multiple times but whenever I define it second time it automatically overwrites the previous one. Following is how I defined it.This is first definition: /sevice : post: summary: Service ABC description: | This service is used to get ABC. parameters: - name: XYZ in: query description: '8' required: true type: number format: integer - name: LMN in: query description: '2' required: true type: