Skip to content

Commit 3bfd83b

Browse files
query and querystring are mutually exclusive
1 parent c602ca6 commit 3bfd83b

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

src/schemas/validation/schema.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,22 @@ $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+
required:
309+
- in
310+
- contains:
311+
type: object
312+
properties:
313+
in:
314+
const: querystring
315+
required:
316+
- in
301317
requestBody:
302318
$ref: '#/$defs/request-body-or-reference'
303319
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)