Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .contractual/changesets/eager-wolves-prowl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"petstore": major
---

## petstore

- **[BREAKING]** remove path at paths./pets/{petId}
2 changes: 1 addition & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@v4

- name: Run Contractual PR Check
uses: contractual-dev/action@v1
uses: contractual-dev/action@v0.1.0-dev.3
with:
mode: pr-check
fail-on-breaking: 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- name: Release Contracts
id: release
uses: contractual-dev/action@v1
uses: contractual-dev/action@v0.1.0-dev.3
with:
mode: release
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,3 +319,4 @@ Runs when changesets are merged to `main` to:
## License

MIT

56 changes: 19 additions & 37 deletions specs/petstore.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@ info:
title: Petstore API
description: A simple API for managing a pet store
version: 1.0.0
license:
name: MIT
url: https://opensource.org/licenses/MIT
contact:
name: API Support
email: support@petstore.example.com

servers:
- url: https://api.petstore.example.com/v1
- url: https://api.petstore.io/v1
description: Production server

security:
- ApiKeyAuth: []

paths:
/pets:
get:
Expand Down Expand Up @@ -38,6 +44,12 @@ paths:
type: array
items:
$ref: '#/components/schemas/Pet'
'400':
description: Invalid request parameters
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal server error
content:
Expand Down Expand Up @@ -77,43 +89,15 @@ paths:
schema:
$ref: '#/components/schemas/Error'

/pets/{petId}:
get:
summary: Get a pet by ID
description: Returns a single pet by its ID
operationId: getPetById
tags:
- pets
parameters:
- name: petId
in: path
required: true
description: ID of the pet to retrieve
schema:
type: string
format: uuid
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
'404':
description: Pet not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'


components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key

schemas:
Pet:
type: object
Expand All @@ -137,7 +121,6 @@ components:
enum:
- dog
- cat
- bird
- rabbit
description: Species of the pet
breed:
Expand Down Expand Up @@ -185,7 +168,6 @@ components:
enum:
- dog
- cat
- bird
- rabbit
description: Species of the pet
breed:
Expand Down
Loading