Skip to content

3.1: fix Link Object schema #4465

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

Merged
merged 1 commit into from
Mar 22, 2025
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
2 changes: 1 addition & 1 deletion src/schemas/validation/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ $defs:
requestBody: true
description:
type: string
body:
server:
$ref: '#/$defs/server'
oneOf:
- required:
Expand Down
112 changes: 112 additions & 0 deletions tests/schema/pass/path_item_servers_parameters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
openapi: 3.1.0
info:
title: API
version: 1.0.0
paths:
/things:
summary: Lots of things
servers:
- url: https://things.example.com
get:
summary: Get a list of things
externalDocs:
description: Find more info here
url: https://example.com
parameters:
- $ref: '#/components/parameters/biscuit'
summary: The maximum number of things to return
description: The maximum number of things to return
responses:
default:
description: A list of things
servers:
- url: https://things.example.com
post:
deprecated: false
requestBody:
$ref: '#/components/requestBodies/ThingRequestBody'
responses:
'201':
$ref: '#/components/responses/ThingResponse'
callbacks:
myCallback:
'{$request.query.queryUrl}':
post:
requestBody:
description: Callback payload
content:
application/json:
schema:
$ref: '#/components/schemas/SomePayload'
responses:
'200':
description: callback successfully processed
transactionCallback:
$ref: '#/components/callbacks/transactionCallback'
patch: {}
delete: {}
head: {}
options: {}
trace: {}
components:
callbacks:
transactionCallback:
'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}':
post:
requestBody:
description: Callback payload
content:
application/json:
schema:
$ref: '#/components/schemas/SomePayload'
responses:
'200':
description: callback successfully processed
examples:
ThingExample:
summary: A thing
description: A thing
value:
id: 1
name: Thing
links:
ThingLink:
description: A link to a thing
operationId: getThing
parameters:
thingId: '$response.body#/id'
server:
url: https://things.example.com
ThingyLink:
$ref: '#/components/links/ThingLink'
parameters:
limit:
name: limit
in: query
required: false
allowEmptyValue: false
allowReserved: false
deprecated: true
description: The maximum number of list items to return
schema:
type: integer
minimum: 0
biscuit:
name: biscuit
in: cookie
style: form
schema:
type: string
requestBodies:
ThingRequestBody:
content:
application/json:
schema:
type: object
responses:
ThingResponse:
description: A thing
content:
application/json:
schema:
type: object