forked from getkin/kin-openapi
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>
- Loading branch information
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
openapi: 3.0.3 | ||
info: | ||
title: API | ||
version: 1.0.0 | ||
paths: { } | ||
components: | ||
schemas: | ||
QueryComponent: | ||
oneOf: | ||
- $ref: '#/components/schemas/AndQuery' | ||
- $ref: '#/components/schemas/OrQuery' | ||
|
||
OrQuery: | ||
required: | ||
- dis_max | ||
properties: | ||
dis_max: | ||
$ref: '#/components/schemas/OrQueryGroup' | ||
|
||
OrQueryGroup: | ||
description: A query that returns the OR of the child queries | ||
required: | ||
- queries | ||
properties: | ||
queries: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/QueryComponent' | ||
|
||
AndQuery: | ||
required: | ||
- bool | ||
properties: | ||
bool: | ||
$ref: '#/components/schemas/AndQueryGroup' | ||
|
||
AndQueryGroup: | ||
description: A query that returns the AND of the child queries | ||
properties: | ||
filter: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/QueryComponent' | ||
must_not: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/QueryComponent' | ||
|
||
Request: | ||
properties: | ||
query: | ||
$ref: '#/components/schemas/QueryComponent' |