Files
matosbox/backend/docs/swagger.json

2117 lines
72 KiB
JSON

{
"swagger": "2.0",
"info": {
"description": "API MatosBox pour la gestion d'inventaire.",
"title": "MatosBox API",
"contact": {},
"version": "0.1.0"
},
"basePath": "/v1",
"paths": {
"/categories": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Categories"
],
"summary": "Lister les categories",
"parameters": [
{
"type": "integer",
"description": "Page",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Limite",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Categories"
],
"summary": "Creer une categorie",
"parameters": [
{
"description": "Categorie a creer",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.categorieRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/ent.Categorie"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/categories/{id}": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Categories"
],
"summary": "Recuperer une categorie",
"parameters": [
{
"type": "string",
"description": "ID categorie",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ent.Categorie"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"put": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Categories"
],
"summary": "Mettre a jour une categorie",
"parameters": [
{
"type": "string",
"description": "ID categorie",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Categorie a mettre a jour",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.categorieRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ent.Categorie"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"tags": [
"Categories"
],
"summary": "Supprimer une categorie",
"parameters": [
{
"type": "string",
"description": "ID categorie",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/champs_personnalises/{id}": {
"put": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ChampsPersonnalises"
],
"summary": "Mettre a jour un champ personnalise",
"parameters": [
{
"type": "string",
"description": "ID champ",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Champ personnalise",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.champPersonnaliseRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ent.ChampPersonnalise"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"tags": [
"ChampsPersonnalises"
],
"summary": "Supprimer un champ personnalise",
"parameters": [
{
"type": "string",
"description": "ID champ",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/emplacements": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Emplacements"
],
"summary": "Lister les emplacements",
"parameters": [
{
"type": "integer",
"description": "Page",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Limite",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Emplacements"
],
"summary": "Creer un emplacement",
"parameters": [
{
"description": "Emplacement a creer",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.emplacementRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/ent.Emplacement"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/emplacements/{id}": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Emplacements"
],
"summary": "Recuperer un emplacement",
"parameters": [
{
"type": "string",
"description": "ID emplacement",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ent.Emplacement"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"put": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Emplacements"
],
"summary": "Mettre a jour un emplacement",
"parameters": [
{
"type": "string",
"description": "ID emplacement",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Emplacement a mettre a jour",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.emplacementRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ent.Emplacement"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"tags": [
"Emplacements"
],
"summary": "Supprimer un emplacement",
"parameters": [
{
"type": "string",
"description": "ID emplacement",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/liens_emplacements/{id}": {
"put": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"LiensEmplacements"
],
"summary": "Mettre a jour un lien objet/emplacement",
"parameters": [
{
"type": "string",
"description": "ID lien",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Mise a jour",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.lienObjetEmplacementUpdateRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ent.LienObjetEmplacement"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"409": {
"description": "Conflict",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"tags": [
"LiensEmplacements"
],
"summary": "Supprimer un lien objet/emplacement",
"parameters": [
{
"type": "string",
"description": "ID lien",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/objets": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Objets"
],
"summary": "Lister les objets",
"parameters": [
{
"type": "integer",
"description": "Page",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Limite",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Objets"
],
"summary": "Creer un objet",
"parameters": [
{
"description": "Objet a creer",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.objetRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/ent.Objet"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/objets/{id}": {
"get": {
"produces": [
"application/json"
],
"tags": [
"Objets"
],
"summary": "Recuperer un objet",
"parameters": [
{
"type": "string",
"description": "ID objet",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ent.Objet"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"put": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Objets"
],
"summary": "Mettre a jour un objet",
"parameters": [
{
"type": "string",
"description": "ID objet",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Objet a mettre a jour",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.objetRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ent.Objet"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"tags": [
"Objets"
],
"summary": "Supprimer un objet",
"parameters": [
{
"type": "string",
"description": "ID objet",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/objets/{id}/champs_personnalises": {
"get": {
"produces": [
"application/json"
],
"tags": [
"ChampsPersonnalises"
],
"summary": "Lister les champs personnalises",
"parameters": [
{
"type": "string",
"description": "ID objet",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Page",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Limite",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ChampsPersonnalises"
],
"summary": "Creer un champ personnalise",
"parameters": [
{
"type": "string",
"description": "ID objet",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Champ personnalise",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.champPersonnaliseRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/ent.ChampPersonnalise"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/objets/{id}/liens_emplacements": {
"get": {
"produces": [
"application/json"
],
"tags": [
"LiensEmplacements"
],
"summary": "Lister les liens objet/emplacement",
"parameters": [
{
"type": "string",
"description": "ID objet",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Page",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Limite",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"LiensEmplacements"
],
"summary": "Creer un lien objet/emplacement",
"parameters": [
{
"type": "string",
"description": "ID objet",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Lien",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.lienObjetEmplacementRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/ent.LienObjetEmplacement"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"409": {
"description": "Conflict",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/objets/{id}/pieces_jointes": {
"get": {
"produces": [
"application/json"
],
"tags": [
"PiecesJointes"
],
"summary": "Lister les pieces jointes",
"parameters": [
{
"type": "string",
"description": "ID objet",
"name": "id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Page",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Limite",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"post": {
"consumes": [
"multipart/form-data"
],
"produces": [
"application/json"
],
"tags": [
"PiecesJointes"
],
"summary": "Uploader des pieces jointes",
"parameters": [
{
"type": "string",
"description": "ID objet",
"name": "id",
"in": "path",
"required": true
},
{
"type": "file",
"description": "Fichiers (multi)",
"name": "fichiers",
"in": "formData",
"required": true
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"413": {
"description": "Request Entity Too Large",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/pieces_jointes/{id}": {
"delete": {
"tags": [
"PiecesJointes"
],
"summary": "Supprimer une piece jointe",
"parameters": [
{
"type": "string",
"description": "ID piece jointe",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/pieces_jointes/{id}/principale": {
"put": {
"produces": [
"application/json"
],
"tags": [
"PiecesJointes"
],
"summary": "Definir la piece jointe principale",
"parameters": [
{
"type": "string",
"description": "ID piece jointe",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/ent.PieceJointe"
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Not Found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
},
"definitions": {
"champpersonnalise.TypeChamp": {
"type": "string",
"enum": [
"string",
"string",
"int",
"bool",
"date"
],
"x-enum-varnames": [
"DefaultTypeChamp",
"TypeChampString",
"TypeChampInt",
"TypeChampBool",
"TypeChampDate"
]
},
"ent.Categorie": {
"type": "object",
"properties": {
"created_at": {
"description": "Date de creation",
"type": "string"
},
"edges": {
"description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the CategorieQuery when eager-loading is set.",
"allOf": [
{
"$ref": "#/definitions/ent.CategorieEdges"
}
]
},
"icone": {
"description": "Nom ou code d'icone",
"type": "string"
},
"id": {
"description": "ID of the ent.\nIdentifiant unique de la categorie",
"type": "string"
},
"nom": {
"description": "Nom de la categorie",
"type": "string"
},
"parent_id": {
"description": "Identifiant du parent",
"type": "string"
},
"slug": {
"description": "Slug URL-friendly",
"type": "string"
},
"updated_at": {
"description": "Date de derniere mise a jour",
"type": "string"
}
}
},
"ent.CategorieEdges": {
"type": "object",
"properties": {
"enfants": {
"description": "Enfants holds the value of the enfants edge.",
"type": "array",
"items": {
"$ref": "#/definitions/ent.Categorie"
}
},
"parent": {
"description": "Lien parent/enfants pour l'arbre des categories",
"allOf": [
{
"$ref": "#/definitions/ent.Categorie"
}
]
}
}
},
"ent.ChampPersonnalise": {
"type": "object",
"properties": {
"created_at": {
"description": "Date de creation",
"type": "string"
},
"edges": {
"description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the ChampPersonnaliseQuery when eager-loading is set.",
"allOf": [
{
"$ref": "#/definitions/ent.ChampPersonnaliseEdges"
}
]
},
"id": {
"description": "ID of the ent.\nIdentifiant unique du champ",
"type": "string"
},
"nom_champ": {
"description": "Nom du champ",
"type": "string"
},
"objet_id": {
"description": "Identifiant de l'objet",
"type": "string"
},
"type_champ": {
"description": "Type du champ",
"allOf": [
{
"$ref": "#/definitions/champpersonnalise.TypeChamp"
}
]
},
"unite": {
"description": "Unite (si applicable)",
"type": "string"
},
"updated_at": {
"description": "Date de derniere mise a jour",
"type": "string"
},
"valeur": {
"description": "Valeur stockee en texte",
"type": "string"
}
}
},
"ent.ChampPersonnaliseEdges": {
"type": "object",
"properties": {
"objet": {
"description": "Objet holds the value of the objet edge.",
"allOf": [
{
"$ref": "#/definitions/ent.Objet"
}
]
}
}
},
"ent.Emplacement": {
"type": "object",
"properties": {
"created_at": {
"description": "Date de creation",
"type": "string"
},
"edges": {
"description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the EmplacementQuery when eager-loading is set.",
"allOf": [
{
"$ref": "#/definitions/ent.EmplacementEdges"
}
]
},
"icone": {
"description": "Nom ou code d'icone",
"type": "string"
},
"id": {
"description": "ID of the ent.\nIdentifiant unique de l'emplacement",
"type": "string"
},
"meuble": {
"description": "Meuble associe",
"type": "string"
},
"nom": {
"description": "Nom de l'emplacement",
"type": "string"
},
"numero_boite": {
"description": "Numero de boite",
"type": "string"
},
"parent_id": {
"description": "Identifiant du parent",
"type": "string"
},
"piece": {
"description": "Piece associee",
"type": "string"
},
"slug": {
"description": "Slug URL-friendly",
"type": "string"
},
"updated_at": {
"description": "Date de derniere mise a jour",
"type": "string"
}
}
},
"ent.EmplacementEdges": {
"type": "object",
"properties": {
"enfants": {
"description": "Enfants holds the value of the enfants edge.",
"type": "array",
"items": {
"$ref": "#/definitions/ent.Emplacement"
}
},
"liens_objets": {
"description": "Liens entre emplacements et objets",
"type": "array",
"items": {
"$ref": "#/definitions/ent.LienObjetEmplacement"
}
},
"parent": {
"description": "Lien parent/enfants pour l'arbre des emplacements",
"allOf": [
{
"$ref": "#/definitions/ent.Emplacement"
}
]
}
}
},
"ent.LienObjetEmplacement": {
"type": "object",
"properties": {
"created_at": {
"description": "Date de creation",
"type": "string"
},
"edges": {
"description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the LienObjetEmplacementQuery when eager-loading is set.",
"allOf": [
{
"$ref": "#/definitions/ent.LienObjetEmplacementEdges"
}
]
},
"emplacement_id": {
"description": "Identifiant de l'emplacement",
"type": "string"
},
"id": {
"description": "ID of the ent.\nIdentifiant unique du lien",
"type": "string"
},
"objet_id": {
"description": "Identifiant de l'objet",
"type": "string"
},
"type": {
"description": "Type de relation",
"allOf": [
{
"$ref": "#/definitions/lienobjetemplacement.Type"
}
]
},
"updated_at": {
"description": "Date de derniere mise a jour",
"type": "string"
}
}
},
"ent.LienObjetEmplacementEdges": {
"type": "object",
"properties": {
"emplacement": {
"description": "Emplacement holds the value of the emplacement edge.",
"allOf": [
{
"$ref": "#/definitions/ent.Emplacement"
}
]
},
"objet": {
"description": "Objet holds the value of the objet edge.",
"allOf": [
{
"$ref": "#/definitions/ent.Objet"
}
]
}
}
},
"ent.Objet": {
"type": "object",
"properties": {
"boutique": {
"description": "Boutique ou fournisseur",
"type": "string"
},
"caracteristiques": {
"description": "Caracteristiques personnalisees",
"type": "object",
"additionalProperties": true
},
"created_at": {
"description": "Date de creation",
"type": "string"
},
"date_achat": {
"description": "Date d'achat",
"type": "string"
},
"description": {
"description": "Description libre",
"type": "string"
},
"edges": {
"description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the ObjetQuery when eager-loading is set.",
"allOf": [
{
"$ref": "#/definitions/ent.ObjetEdges"
}
]
},
"fabricant": {
"description": "Fabricant",
"type": "string"
},
"id": {
"description": "ID of the ent.\nIdentifiant unique de l'objet",
"type": "string"
},
"nom": {
"description": "Nom de l'objet",
"type": "string"
},
"numero_modele": {
"description": "Numero de modele",
"type": "string"
},
"numero_serie": {
"description": "Numero de serie",
"type": "string"
},
"prix_achat": {
"description": "Prix d'achat",
"type": "number"
},
"quantite": {
"description": "Quantite en stock",
"type": "integer"
},
"statut": {
"description": "Statut de l'objet",
"allOf": [
{
"$ref": "#/definitions/objet.Statut"
}
]
},
"updated_at": {
"description": "Date de derniere mise a jour",
"type": "string"
}
}
},
"ent.ObjetEdges": {
"type": "object",
"properties": {
"champs_personnalises": {
"description": "ChampsPersonnalises holds the value of the champs_personnalises edge.",
"type": "array",
"items": {
"$ref": "#/definitions/ent.ChampPersonnalise"
}
},
"liens_emplacements": {
"description": "LiensEmplacements holds the value of the liens_emplacements edge.",
"type": "array",
"items": {
"$ref": "#/definitions/ent.LienObjetEmplacement"
}
},
"pieces_jointes": {
"description": "PiecesJointes holds the value of the pieces_jointes edge.",
"type": "array",
"items": {
"$ref": "#/definitions/ent.PieceJointe"
}
}
}
},
"ent.PieceJointe": {
"type": "object",
"properties": {
"categorie": {
"description": "Categorie de la piece jointe",
"allOf": [
{
"$ref": "#/definitions/piecejointe.Categorie"
}
]
},
"chemin": {
"description": "Chemin de stockage",
"type": "string"
},
"created_at": {
"description": "Date de creation",
"type": "string"
},
"edges": {
"description": "Edges holds the relations/edges for other nodes in the graph.\nThe values are being populated by the PieceJointeQuery when eager-loading is set.",
"allOf": [
{
"$ref": "#/definitions/ent.PieceJointeEdges"
}
]
},
"est_principale": {
"description": "Piece jointe principale",
"type": "boolean"
},
"id": {
"description": "ID of the ent.\nIdentifiant unique de la piece jointe",
"type": "string"
},
"nom_fichier": {
"description": "Nom du fichier",
"type": "string"
},
"objet_id": {
"description": "Identifiant de l'objet",
"type": "string"
},
"type_mime": {
"description": "Type MIME",
"type": "string"
},
"updated_at": {
"description": "Date de derniere mise a jour",
"type": "string"
}
}
},
"ent.PieceJointeEdges": {
"type": "object",
"properties": {
"objet": {
"description": "Objet holds the value of the objet edge.",
"allOf": [
{
"$ref": "#/definitions/ent.Objet"
}
]
}
}
},
"handlers.categorieRequest": {
"type": "object",
"properties": {
"icone": {
"type": "string"
},
"nom": {
"type": "string"
},
"parent_id": {
"type": "string"
},
"slug": {
"type": "string"
}
}
},
"handlers.champPersonnaliseRequest": {
"type": "object",
"properties": {
"nom_champ": {
"type": "string"
},
"type_champ": {
"type": "string"
},
"unite": {
"type": "string"
},
"valeur": {
"type": "string"
}
}
},
"handlers.emplacementRequest": {
"type": "object",
"properties": {
"icone": {
"type": "string"
},
"meuble": {
"type": "string"
},
"nom": {
"type": "string"
},
"numero_boite": {
"type": "string"
},
"parent_id": {
"type": "string"
},
"piece": {
"type": "string"
},
"slug": {
"type": "string"
}
}
},
"handlers.lienObjetEmplacementRequest": {
"type": "object",
"properties": {
"emplacement_id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"handlers.lienObjetEmplacementUpdateRequest": {
"type": "object",
"properties": {
"emplacement_id": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"handlers.objetRequest": {
"type": "object",
"properties": {
"boutique": {
"type": "string"
},
"caracteristiques": {
"type": "object",
"additionalProperties": {}
},
"date_achat": {
"type": "string"
},
"description": {
"type": "string"
},
"fabricant": {
"type": "string"
},
"nom": {
"type": "string"
},
"numero_modele": {
"type": "string"
},
"numero_serie": {
"type": "string"
},
"prix_achat": {
"type": "number"
},
"quantite": {
"type": "integer"
},
"statut": {
"type": "string"
}
}
},
"lienobjetemplacement.Type": {
"type": "string",
"enum": [
"stocke",
"stocke",
"utilise_dans"
],
"x-enum-varnames": [
"DefaultType",
"TypeStocke",
"TypeUtiliseDans"
]
},
"objet.Statut": {
"type": "string",
"enum": [
"en_stock",
"en_stock",
"pret",
"hors_service",
"archive"
],
"x-enum-varnames": [
"DefaultStatut",
"StatutEnStock",
"StatutPret",
"StatutHorsService",
"StatutArchive"
]
},
"piecejointe.Categorie": {
"type": "string",
"enum": [
"image",
"image",
"pdf_notice",
"markdown_tuto"
],
"x-enum-varnames": [
"DefaultCategorie",
"CategorieImage",
"CategoriePdfNotice",
"CategorieMarkdownTuto"
]
}
}
}