Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a description key in ProductType in common.yaml #12

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/pull_request_merge_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Setup specmatic
uses: airslate-oss/setup-specmatic@v1
with:
specmatic-version: 1.3.16
specmatic-version: 1.3.20

- name: Run backward compatibility check on changed files
if: steps.changed-files-specific.outputs.any_changed == 'true'
Expand Down
1 change: 1 addition & 0 deletions in/specmatic/examples/store/api_order_v1.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
openapi: 3.0.0
info:

Check warning on line 2 in in/specmatic/examples/store/api_order_v1.yaml

View workflow job for this annotation

GitHub Actions / Check API Contracts

info-contact Info object must have "contact" object.

Check warning on line 2 in in/specmatic/examples/store/api_order_v1.yaml

View workflow job for this annotation

GitHub Actions / Check API Contracts

info-description Info "description" must be present and non-empty string.
title: Order API
version: '1.0'
servers:
Expand All @@ -20,10 +20,10 @@
DELETE_PRODUCT:
value: 20
INVALID_ID:
value: "344"

Check warning on line 23 in in/specmatic/examples/store/api_order_v1.yaml

View workflow job for this annotation

GitHub Actions / Check API Contracts

oas3-valid-media-example "value" property type must be number
get:

Check warning on line 24 in in/specmatic/examples/store/api_order_v1.yaml

View workflow job for this annotation

GitHub Actions / Check API Contracts

operation-description Operation "description" must be present and non-empty string.
summary: Fetch product details
tags: []

Check warning on line 26 in in/specmatic/examples/store/api_order_v1.yaml

View workflow job for this annotation

GitHub Actions / Check API Contracts

operation-tags Operation must have non-empty "tags" array.
responses:
'200':
description: OK
Expand All @@ -33,7 +33,7 @@
$ref: './common.yaml#/components/schemas/Product'
examples:
GET_DETAILS:
value:

Check warning on line 36 in in/specmatic/examples/store/api_order_v1.yaml

View workflow job for this annotation

GitHub Actions / Check API Contracts

oas3-valid-media-example "value" property must have required property "description"
name: 'XYZ Phone'
type: 'gadget'
inventory: 10
Expand Down Expand Up @@ -78,7 +78,7 @@
error: "Not Found"
path: "/products/344"
operationId: get-product-id
post:

Check warning on line 81 in in/specmatic/examples/store/api_order_v1.yaml

View workflow job for this annotation

GitHub Actions / Check API Contracts

operation-description Operation "description" must be present and non-empty string.

Check warning on line 81 in in/specmatic/examples/store/api_order_v1.yaml

View workflow job for this annotation

GitHub Actions / Check API Contracts

operation-tags Operation must have non-empty "tags" array.
summary: Update product details
operationId: post-products-id
security:
Expand Down Expand Up @@ -117,12 +117,12 @@
$ref: './common.yaml#/components/schemas/Product'
examples:
UPDATE_DETAILS:
value:

Check warning on line 120 in in/specmatic/examples/store/api_order_v1.yaml

View workflow job for this annotation

GitHub Actions / Check API Contracts

oas3-valid-media-example "value" property must have required property "description"
name: 'XYZ Fone'
type: 'gadget'
inventory: 10
id: 10
delete:

Check warning on line 125 in in/specmatic/examples/store/api_order_v1.yaml

View workflow job for this annotation

GitHub Actions / Check API Contracts

operation-description Operation "description" must be present and non-empty string.
summary: Delete a product
operationId: delete-products-id
security:
Expand Down Expand Up @@ -199,6 +199,7 @@
name: 'XYZ Laptop'
type: 'gadget'
inventory: 10
description: false
get:
summary: Search for products
operationId: get-products
Expand Down
3 changes: 3 additions & 0 deletions in/specmatic/examples/store/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ components:
$ref: '#/components/schemas/ProductType'
inventory:
type: integer
description:
type: integer
required:
- name
- type
- inventory
- description
ProductType:
type: string
title: Product Type
Expand Down
Loading