cloudapi: validate input

Validate incoming requests with openapi3. Remove unsupported
uuid format from the openapi spec. Similarly, change url to uri as
uri is a supported format and url is not.

Co-authored-by: Ondřej Budai <obudai@redhat.com>
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Chloe Kaubisch 2022-03-10 14:16:36 +00:00
parent f616becf39
commit 13c79294b6
83 changed files with 4942 additions and 549 deletions

View file

@ -0,0 +1,2 @@
type: string
example: bar

View file

@ -0,0 +1,4 @@
type: object
properties:
bar:
$ref: ../openapi.yml#/components/schemas/Bar

View file

@ -0,0 +1,4 @@
type: object
properties:
foo:
$ref: ../../openapi.yml#/components/schemas/Foo

View file

@ -0,0 +1,15 @@
openapi: "3.0.3"
info:
title: Recursive refs example
version: "1.0"
paths:
/foo:
$ref: ./paths/foo.yml
components:
schemas:
Foo:
$ref: ./components/Foo.yml
Foo2:
$ref: ./components/Foo/Foo2.yml
Bar:
$ref: ./components/Bar.yml

View file

@ -0,0 +1,11 @@
get:
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
properties:
foo2:
$ref: ../openapi.yml#/components/schemas/Foo2