Skip to content

Commit f475768

Browse files
authored
feat!: remove GET /pets/{petId} endpoint (#2)
* feat!: remove GET /pets/{petId} endpoint BREAKING CHANGE: Removed individual pet lookup endpoint * ci: use v0.1.0-dev.0 action version * test: trigger workflow rerun * ci: revert to action-based workflows * test: trigger workflow with fixed action * ci: upgrade to action v0.1.0-dev.1 with ESM fixes * ci: upgrade to action v0.1.0-dev.2 * ci: upgrade to action v0.1.0-dev.3 * fix: add security scheme, license, and 4xx responses
1 parent bc7e60a commit f475768

5 files changed

Lines changed: 29 additions & 39 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"petstore": major
3+
---
4+
5+
## petstore
6+
7+
- **[BREAKING]** remove path at paths./pets/{petId}

.github/workflows/pr-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: actions/checkout@v4
1919

2020
- name: Run Contractual PR Check
21-
uses: contractual-dev/action@v1
21+
uses: contractual-dev/action@v0.1.0-dev.3
2222
with:
2323
mode: pr-check
2424
fail-on-breaking: 'true'

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
- name: Release Contracts
2222
id: release
23-
uses: contractual-dev/action@v1
23+
uses: contractual-dev/action@v0.1.0-dev.3
2424
with:
2525
mode: release
2626
github-token: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,3 +319,4 @@ Runs when changesets are merged to `main` to:
319319
## License
320320

321321
MIT
322+

specs/petstore.openapi.yaml

Lines changed: 19 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,20 @@ info:
33
title: Petstore API
44
description: A simple API for managing a pet store
55
version: 1.0.0
6+
license:
7+
name: MIT
8+
url: https://opensource.org/licenses/MIT
69
contact:
710
name: API Support
811
email: support@petstore.example.com
912

1013
servers:
11-
- url: https://api.petstore.example.com/v1
14+
- url: https://api.petstore.io/v1
1215
description: Production server
1316

17+
security:
18+
- ApiKeyAuth: []
19+
1420
paths:
1521
/pets:
1622
get:
@@ -38,6 +44,12 @@ paths:
3844
type: array
3945
items:
4046
$ref: '#/components/schemas/Pet'
47+
'400':
48+
description: Invalid request parameters
49+
content:
50+
application/json:
51+
schema:
52+
$ref: '#/components/schemas/Error'
4153
'500':
4254
description: Internal server error
4355
content:
@@ -77,43 +89,15 @@ paths:
7789
schema:
7890
$ref: '#/components/schemas/Error'
7991

80-
/pets/{petId}:
81-
get:
82-
summary: Get a pet by ID
83-
description: Returns a single pet by its ID
84-
operationId: getPetById
85-
tags:
86-
- pets
87-
parameters:
88-
- name: petId
89-
in: path
90-
required: true
91-
description: ID of the pet to retrieve
92-
schema:
93-
type: string
94-
format: uuid
95-
responses:
96-
'200':
97-
description: Successful response
98-
content:
99-
application/json:
100-
schema:
101-
$ref: '#/components/schemas/Pet'
102-
'404':
103-
description: Pet not found
104-
content:
105-
application/json:
106-
schema:
107-
$ref: '#/components/schemas/Error'
108-
'500':
109-
description: Internal server error
110-
content:
111-
application/json:
112-
schema:
113-
$ref: '#/components/schemas/Error'
11492

11593

11694
components:
95+
securitySchemes:
96+
ApiKeyAuth:
97+
type: apiKey
98+
in: header
99+
name: X-API-Key
100+
117101
schemas:
118102
Pet:
119103
type: object
@@ -137,7 +121,6 @@ components:
137121
enum:
138122
- dog
139123
- cat
140-
- bird
141124
- rabbit
142125
description: Species of the pet
143126
breed:
@@ -185,7 +168,6 @@ components:
185168
enum:
186169
- dog
187170
- cat
188-
- bird
189171
- rabbit
190172
description: Species of the pet
191173
breed:

0 commit comments

Comments
 (0)