mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
creation of endpoints POST, PUT, PATCH, but still errors
This commit is contained in:
@@ -8,17 +8,47 @@ servers:
|
||||
- url: "/api"
|
||||
description: "Your current dev server"
|
||||
|
||||
components:
|
||||
schemas:
|
||||
Thirdparty:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
readOnly: true
|
||||
name:
|
||||
type: string
|
||||
nameCompany:
|
||||
type: string
|
||||
acronym:
|
||||
type: string
|
||||
email:
|
||||
type: string
|
||||
|
||||
paths:
|
||||
/1.0/thirdparty/thirdparty.json:
|
||||
get:
|
||||
post:
|
||||
tags:
|
||||
- thirdparty
|
||||
summary: Return a list of all thirdparty items
|
||||
summary: Create a single thirdparty
|
||||
requestBody:
|
||||
description: "A thirdparty"
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Thirdparty"
|
||||
responses:
|
||||
200:
|
||||
description: "ok"
|
||||
401:
|
||||
description: "OK"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Thirdparty"
|
||||
403:
|
||||
description: "Unauthorized"
|
||||
422:
|
||||
description: "Invalid data"
|
||||
|
||||
/1.0/thirdparty/thirdparty/{id}.json:
|
||||
get:
|
||||
@@ -41,3 +71,62 @@ paths:
|
||||
description: "not found"
|
||||
401:
|
||||
description: "Unauthorized"
|
||||
patch:
|
||||
tags:
|
||||
- thirdparty
|
||||
summary: "Alter a thirdparty"
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
description: The thirdparty's id
|
||||
schema:
|
||||
type: integer
|
||||
format: integer
|
||||
minimum: 1
|
||||
requestBody:
|
||||
description: "A thirdparty"
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Thirdparty"
|
||||
responses:
|
||||
401:
|
||||
description: "Unauthorized"
|
||||
404:
|
||||
description: "Not found"
|
||||
200:
|
||||
description: "OK"
|
||||
422:
|
||||
description: "Object with validation errors"
|
||||
put:
|
||||
tags:
|
||||
- thirdparty
|
||||
summary: Edit an existing thirdparty
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
description: The thirdparty's id
|
||||
schema:
|
||||
type: integer
|
||||
format: integer
|
||||
minimum: 1
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Thirdparty"
|
||||
responses:
|
||||
401:
|
||||
description: "Unauthorized"
|
||||
404:
|
||||
description: "Not found"
|
||||
200:
|
||||
description: "OK"
|
||||
422:
|
||||
description: "Unprocessable entity (validation errors)"
|
||||
400:
|
||||
description: "Bad Request"
|
||||
|
Reference in New Issue
Block a user