diff --git a/.contractual/changesets/eager-wolves-prowl.md b/.contractual/changesets/eager-wolves-prowl.md new file mode 100644 index 0000000..46291a2 --- /dev/null +++ b/.contractual/changesets/eager-wolves-prowl.md @@ -0,0 +1,7 @@ +--- +"petstore": major +--- + +## petstore + +- **[BREAKING]** remove path at paths./pets/{petId} diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index af0b554..6242c20 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -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' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f70b92d..6340056 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }} diff --git a/README.md b/README.md index b2bcff5..c69393f 100644 --- a/README.md +++ b/README.md @@ -319,3 +319,4 @@ Runs when changesets are merged to `main` to: ## License MIT + diff --git a/specs/petstore.openapi.yaml b/specs/petstore.openapi.yaml index 8f565f2..1ee263a 100644 --- a/specs/petstore.openapi.yaml +++ b/specs/petstore.openapi.yaml @@ -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: @@ -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: @@ -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 @@ -137,7 +121,6 @@ components: enum: - dog - cat - - bird - rabbit description: Species of the pet breed: @@ -185,7 +168,6 @@ components: enum: - dog - cat - - bird - rabbit description: Species of the pet breed: