You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I was building a intentionally broken file for a test, and noticed a funny looking error:
Not sure why the quotes and asterix. Maybe just the quotes but definitely not the asterix.
To Reproduce
Lint this document on stoplight.io/spectral and it'll appear.
openapi: '3.0.0'
info:
version: 1.0.0
title: Swagger Petstore
license:
name: MIT
paths:
/pets:
get:
summary: Info for a specific pet
operationId: showPetById
tags:
- pets
parameters:
- name: petId
in: path
required: true
description: The id of the pet to retrieve
schema:
type: string
responses:
'200':
description: Expected response to a valid request
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
components:
schemas:
Pet:
required:
- id
- name
properties:
id:
type: integer
format: int64
name:
type: string
tag:
type: string
The text was updated successfully, but these errors were encountered:
====test====
Request only errors be shown, but no errors exist
====document====
openapi: '3.0.0'
info:
version: 1.0.0
title: Swagger Petstore
license:
name: MIT
paths:
/pets/{petId}:
get:
summary: Info for a specific pet
operationId: showPetById
tags:
- pets
parameters:
- name: petId
in: path
required: true
description: The id of the pet to retrieve
schema:
type: string
responses:
'200':
description: Expected response to a valid request
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
components:
schemas:
Pet:
required:
- id
- name
properties:
id:
type: integer
format: int64
name:
type: string
tag:
type: string
====command====
lint {document} --fail-severity=error --display-only-fail-severity-results
====status====
0
====stdout====
OpenAPI 3.x detected
1:1 warning api-servers OpenAPI `servers` must be present and non-empty array.
2:6 warning info-contact Info object should contain `contact` object.
2:6 warning info-description OpenAPI object info `description` must be present and non-empty string.
9:9 warning operation-description Operation `description` must be present and non-empty string.
15:11 error path-params Parameter "**petId**" is not used in the path "**/pets**".
Unused parameters are not allowed.
To fix, remove this parameter.
✖ 5 problems (1 error, 4 warnings, 0 infos)
We probably don't want those three lines of output.
Describe the bug
I was building a intentionally broken file for a test, and noticed a funny looking error:
Not sure why the quotes and asterix. Maybe just the quotes but definitely not the asterix.
To Reproduce
Lint this document on stoplight.io/spectral and it'll appear.
The text was updated successfully, but these errors were encountered: