forked from backstage/backstage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump dependency `swagger-ui-react` to v5.0.0 which includes support for OpenAPI Specification (OAS) v3.1.0. `@types/swagger-ui-react` v4.18.0 seems still compatible. Closes: backstage#8090 Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
- Loading branch information
1 parent
5b38139
commit af748a1
Showing
9 changed files
with
1,170 additions
and
413 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@backstage/catalog-model': patch | ||
--- | ||
|
||
Add OpenAPI Specification (OAS) v3.1.0 examples. |
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,5 @@ | ||
--- | ||
'@backstage/plugin-api-docs': patch | ||
--- | ||
|
||
Add support for OpenAPI Specification (OAS) v3.1.0 using swagger-ui v5.0.0. |
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
21 changes: 21 additions & 0 deletions
21
packages/catalog-model/examples/apis/petstore-webhook-api.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,21 @@ | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: API | ||
metadata: | ||
name: petstore-webhook | ||
description: The petstore webhook API | ||
tags: | ||
- store | ||
- rest | ||
links: | ||
- url: https://github.com/swagger-api/swagger-petstore | ||
title: GitHub Repo | ||
icon: github | ||
- url: https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v3.1/webhook-example.yaml | ||
title: API Spec | ||
icon: code | ||
spec: | ||
type: openapi | ||
lifecycle: experimental | ||
owner: team-c | ||
definition: | ||
$text: ./petstore-webhook.oas.yaml |
34 changes: 34 additions & 0 deletions
34
packages/catalog-model/examples/apis/petstore-webhook.oas.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,34 @@ | ||
openapi: 3.1.0 | ||
info: | ||
title: Webhook Example | ||
version: 1.0.0 | ||
# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components | ||
webhooks: | ||
# Each webhook needs a name | ||
newPet: | ||
# This is a Path Item Object, the only difference is that the request is initiated by the API provider | ||
post: | ||
requestBody: | ||
description: Information about a new pet in the system | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Pet' | ||
responses: | ||
'200': | ||
description: Return a 200 status to indicate that the data was received successfully | ||
|
||
components: | ||
schemas: | ||
Pet: | ||
required: | ||
- id | ||
- name | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
name: | ||
type: string | ||
tag: | ||
type: string |
Oops, something went wrong.