-
Notifications
You must be signed in to change notification settings - Fork 9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Render external docs links and descriptions (#7559)
Co-authored-by: Tim Lai <[email protected]>
- Loading branch information
Showing
10 changed files
with
443 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,6 +118,11 @@ | |
flex: 1; | ||
} | ||
} | ||
|
||
.info__externaldocs | ||
{ | ||
text-align: right; | ||
} | ||
} | ||
|
||
.parameter__type | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
148 changes: 148 additions & 0 deletions
148
test/e2e-cypress/static/documents/features/external-docs.openapi.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
openapi: 3.0.2 | ||
|
||
info: | ||
title: External Docs | ||
version: "1" | ||
|
||
externalDocs: | ||
description: Read external docs | ||
url: http://swagger.io | ||
|
||
tags: | ||
- name: pet | ||
description: Everything about your Pets | ||
externalDocs: | ||
description: Pet Documentation | ||
url: http://swagger.io | ||
- name: petWithoutDescription | ||
externalDocs: | ||
url: http://swagger.io | ||
|
||
paths: | ||
/pet: | ||
put: | ||
externalDocs: | ||
description: More details about putting a pet | ||
url: http://swagger.io | ||
tags: | ||
- pet | ||
summary: Update an existing pet | ||
description: Update an existing pet by Id | ||
operationId: updatePet | ||
requestBody: | ||
description: Update an existent pet in the store | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Pet' | ||
required: true | ||
responses: | ||
"200": | ||
description: Successful operation | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Pet' | ||
"400": | ||
description: Invalid ID supplied | ||
"404": | ||
description: Pet not found | ||
"405": | ||
description: Validation exception | ||
post: | ||
externalDocs: | ||
url: http://swagger.io | ||
tags: | ||
- pet | ||
summary: Add a new pet to the store | ||
description: Add a new pet to the store | ||
operationId: addPet | ||
requestBody: | ||
description: Create a new pet in the store | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Pet' | ||
required: true | ||
responses: | ||
"200": | ||
description: Successful operation | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Pet' | ||
"405": | ||
description: Invalid input | ||
|
||
components: | ||
schemas: | ||
Pet: | ||
required: | ||
- name | ||
- photoUrls | ||
type: object | ||
description: This is a Pet | ||
externalDocs: | ||
description: More Docs About Pet | ||
url: http://swagger.io | ||
deprecated: true | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
example: 10 | ||
name: | ||
type: string | ||
example: doggie | ||
photoUrls: | ||
type: array | ||
items: | ||
type: string | ||
status: | ||
type: string | ||
description: pet status in the store | ||
enum: | ||
- available | ||
- pending | ||
- sold | ||
Object: | ||
type: object | ||
externalDocs: | ||
description: Object Docs | ||
url: http://swagger.io | ||
properties: | ||
name: | ||
type: string | ||
ObjectWithoutDescription: | ||
type: object | ||
externalDocs: | ||
url: http://swagger.io | ||
properties: | ||
name: | ||
type: string | ||
Primitive: | ||
description: Just a string schema | ||
type: string | ||
externalDocs: | ||
description: Primitive Docs | ||
url: http://swagger.io | ||
PrimitiveWithoutDescription: | ||
description: Just a string schema | ||
type: string | ||
externalDocs: | ||
url: http://swagger.io | ||
Array: | ||
description: Just an array schema | ||
type: array | ||
externalDocs: | ||
description: Array Docs | ||
url: http://swagger.io | ||
items: | ||
type: string | ||
ArrayWithoutDescription: | ||
description: Just an array schema | ||
type: array | ||
externalDocs: | ||
url: http://swagger.io | ||
items: | ||
type: string |
Oops, something went wrong.