Skip to content

Commit 63e0b15

Browse files
query and querystring are mutually exclusive
1 parent 705ae93 commit 63e0b15

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

src/schemas/validation/schema.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,18 @@ $defs:
298298
type: array
299299
items:
300300
$ref: '#/$defs/parameter-or-reference'
301+
not:
302+
allOf:
303+
- contains:
304+
type: object
305+
properties:
306+
in:
307+
const: query
308+
- contains:
309+
type: object
310+
properties:
311+
in:
312+
const: querystring
301313
requestBody:
302314
$ref: '#/$defs/request-body-or-reference'
303315
responses:
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
openapi: 3.2.0
2+
info:
3+
title: API
4+
version: 1.0.0
5+
components:
6+
pathItems:
7+
my-path-item:
8+
get:
9+
description: a query parameter cannot be used together with a querystring parameter
10+
parameters:
11+
- name: myquerystring
12+
in: querystring
13+
content:
14+
application/json:
15+
schema:
16+
type: string
17+
- name: myquery
18+
in: query
19+
schema:
20+
type: string

0 commit comments

Comments
 (0)