231 lines
5.3 KiB
YAML
231 lines
5.3 KiB
YAML
openapi: 3.0.0
|
|
info:
|
|
description: "This is a sample server Petstore server. You can find out more about
|
|
Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net,
|
|
#swagger](http://swagger.io/irc/). For this sample, you can use the api key
|
|
`special-key` to test the authorization filters."
|
|
version: 1.0.2
|
|
title: Swagger Petstore
|
|
termsOfService: http://swagger.io/terms/
|
|
contact:
|
|
email: apiteam@swagger.io
|
|
license:
|
|
name: Apache 2.0
|
|
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
|
tags:
|
|
- name: console
|
|
description: consoles supportés
|
|
externalDocs:
|
|
description: Find out more
|
|
url: http://swagger.io
|
|
- name: rom
|
|
description: roms supportés
|
|
externalDocs:
|
|
description: Find out more
|
|
url: http://swagger.io
|
|
- name: extention
|
|
description: extention supportés
|
|
externalDocs:
|
|
description: Find out more
|
|
url: http://swagger.io
|
|
- name: langage
|
|
description: langages supportés
|
|
externalDocs:
|
|
description: Find out more
|
|
url: http://swagger.io
|
|
|
|
paths:
|
|
/consoles:
|
|
get:
|
|
tags:
|
|
- console
|
|
summary: Liste les consoles
|
|
description: ""
|
|
operationId: listconsole
|
|
responses:
|
|
"200":
|
|
description: Tout est ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/console"
|
|
|
|
/consoles/{id}:
|
|
get:
|
|
tags:
|
|
- console
|
|
summary: Liste les consoles
|
|
description: ""
|
|
operationId: listconsole
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
description: ID de la console
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
responses:
|
|
"200":
|
|
description: Tout est ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/console"
|
|
"404":
|
|
description: console non trouvée
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/error"
|
|
|
|
/consoles/{id}/roms:
|
|
get:
|
|
tags:
|
|
- console
|
|
summary: Liste les roms de la console
|
|
description: ""
|
|
operationId: listromfromconsole
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
description: ID de la console
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
responses:
|
|
"200":
|
|
description: Tout est ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/rom"
|
|
"404":
|
|
description: Invalid input
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/error"
|
|
|
|
/roms:
|
|
get:
|
|
tags:
|
|
- rom
|
|
summary: Liste les roms
|
|
description: ""
|
|
operationId: listrom
|
|
responses:
|
|
"200":
|
|
description: Tout est ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/rom"
|
|
|
|
/roms/{id}:
|
|
get:
|
|
tags:
|
|
- rom
|
|
summary: donnée d'une rom
|
|
description: ""
|
|
operationId: listrom
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
description: ID de la rom
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
responses:
|
|
"200":
|
|
description: Tout est ok
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/rom"
|
|
"404":
|
|
description: rom non trouvée
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/error"
|
|
|
|
|
|
|
|
externalDocs:
|
|
description: Find out more about Swagger
|
|
url: http://swagger.io
|
|
servers:
|
|
- url: https://videogamedb.simailadjalim.fr
|
|
components:
|
|
requestBodies:
|
|
UserArray:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/console"
|
|
description: List of user object
|
|
required: true
|
|
Pet:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/console"
|
|
application/xml:
|
|
schema:
|
|
$ref: "#/components/schemas/console"
|
|
description: Pet object that needs to be added to the store
|
|
required: true
|
|
schemas:
|
|
console:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: integer
|
|
format: int32
|
|
name:
|
|
type: string
|
|
core:
|
|
type: string
|
|
playable:
|
|
type: boolean
|
|
rom:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: integer
|
|
name:
|
|
type: string
|
|
language_id:
|
|
type: integer
|
|
extention_id:
|
|
type: integer
|
|
console_id:
|
|
type: integer
|
|
extention:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: integer
|
|
name:
|
|
type: string
|
|
langage:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: integer
|
|
name:
|
|
type: string
|
|
error:
|
|
type: object
|
|
properties:
|
|
error:
|
|
type: string
|