Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
4d72b357
Verified
Commit
4d72b357
authored
6 years ago
by
Florian Azizian
Browse files
Options
Downloads
Patches
Plain Diff
FEAT #7640 add schema json rest
parent
204d8105
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rest/schema.json
+283
-0
283 additions, 0 deletions
rest/schema.json
with
283 additions
and
0 deletions
rest/schema.json
0 → 100644
+
283
−
0
View file @
4d72b357
{
"swagger"
:
"2.0"
,
"info"
:
{
"title"
:
"Maarch Courrier"
,
"version"
:
"18.10"
,
"description"
:
"Documentation de l'API Maarch Courrier V18.10"
,
"contact"
:
{
"name"
:
"Maarch"
,
"email"
:
"info@maarch.org"
}
},
"paths"
:
{
"/rest/res/resource/status"
:
{
"put"
:
{
"description"
:
"Update documents status"
,
"operationId"
:
" Resource/controllers/ResController::updateStatus"
,
"parameters"
:
[
{
"name"
:
"resId"
,
"description"
:
"Documents identifier"
,
"in"
:
"body"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"array"
,
"items"
:
{
"type"
:
"integer"
,
"example"
:
101
}
}
},
{
"name"
:
"chrono"
,
"description"
:
"Documents chrono number"
,
"in"
:
"body"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"array"
,
"items"
:
{
"type"
:
"string"
,
"maxLength"
:
255
,
"example"
:
"MAARCH/2017A/91"
}
}
},
{
"name"
:
"status"
,
"description"
:
"New status"
,
"in"
:
"body"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"maxLength"
:
10
,
"default"
:
"COU"
,
"example"
:
"NEW"
}
},
{
"name"
:
"historyMessage"
,
"description"
:
"Message in history table"
,
"in"
:
"body"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"default"
:
"status update"
,
"example"
:
"Document is reopen"
}
}
],
"responses"
:
{
"200"
:
{
"description"
:
"Status updated"
,
"schema"
:
{
"type"
:
"object"
,
"properties"
:
{
"success"
:
{
"type"
:
"string"
}
}
},
"examples"
:
{
"application/json"
:
{
"success"
:
"success"
}
}
},
"400"
:
{
"description"
:
"Status or document not found"
,
"schema"
:
{
"type"
:
"object"
,
"properties"
:
{
"errors"
:
{
"type"
:
"string"
}
}
},
"examples"
:
{
"application/json"
:
{
"errors"
:
"Status not found"
}
}
},
"403"
:
{
"description"
:
"Document is out of perimeter"
,
"schema"
:
{
"type"
:
"object"
,
"properties"
:
{
"errors"
:
{
"type"
:
"string"
}
}
},
"examples"
:
{
"application/json"
:
{
"errors"
:
"Document out of perimeter"
}
}
}
}
}
},
"/rest/entities/{id}"
:
{
"get"
:
{
"description"
:
"Get entity informations"
,
"operationId"
:
"Entity/controllers/EntityController::getById"
,
"parameters"
:
[
{
"name"
:
"id"
,
"description"
:
"Entity identifier"
,
"in"
:
"path"
,
"required"
:
true
,
"type"
:
"string"
,
"maxLength"
:
32
}
],
"responses"
:
{
"200"
:
{
"description"
:
"Return entity informations"
,
"schema"
:
{
"$ref"
:
"#/definitions/EntityRead"
},
"examples"
:
{
"application/json"
:
{
"entity"
:
{
"entity_id"
:
"VILLE"
,
"entity_label"
:
"Ville de Maarch-Les-Bains"
,
"short_label"
:
"Ville de Maarch-Les-Bains"
,
"enabled"
:
"Y"
,
"adrs_1"
:
"11 Bd du sud-est"
,
"adrs_2"
:
""
,
"adrs_3"
:
""
,
"zipcode"
:
"92000"
,
"city"
:
"Nanterre"
,
"country"
:
"FRANCE"
,
"email"
:
"info@maarchlesbains.org"
,
"business_id"
:
""
,
"parent_entity_id"
:
""
,
"entity_type"
:
"Direction"
,
"entity_path"
:
""
,
"ldap_id"
:
""
,
"archival_agency"
:
""
,
"archival_agreement"
:
""
,
"entity_full_name"
:
""
}
}
}
},
"400"
:
{
"description"
:
"Entity not found"
,
"schema"
:
{
"type"
:
"object"
,
"properties"
:
{
"errors"
:
{
"type"
:
"string"
}
}
},
"examples"
:
{
"application/json"
:
{
"errors"
:
"Entity not found"
}
}
}
}
}
}
},
"definitions"
:
{
"EntityRead"
:
{
"type"
:
"object"
,
"required"
:
[
"entity"
],
"properties"
:
{
"entity"
:
{
"required"
:
[
"entity_id"
,
"entity_label"
,
"short_label"
,
"entity_type"
,
"enabled"
,
],
"properties"
:
{
"entity_id"
:
{
"type"
:
"string"
,
"maxLength"
:
32
},
"entity_label"
:
{
"type"
:
"string"
,
"maxLength"
:
255
},
"short_label"
:
{
"type"
:
"string"
,
"maxLength"
:
50
},
"enabled"
:
{
"type"
:
"string"
,
"maxLength"
:
1
},
"adrs_1"
:
{
"type"
:
"string"
,
"maxLength"
:
255
},
"adrs_2"
:
{
"type"
:
"string"
,
"maxLength"
:
255
},
"adrs_3"
:
{
"type"
:
"string"
,
"maxLength"
:
255
},
"zipcode"
:
{
"type"
:
"string"
,
"maxLength"
:
32
},
"city"
:
{
"type"
:
"string"
,
"maxLength"
:
255
},
"country"
:
{
"type"
:
"string"
,
"maxLength"
:
255
},
"email"
:
{
"type"
:
"string"
,
"maxLength"
:
255
},
"business_id"
:
{
"type"
:
"string"
,
"maxLength"
:
32
},
"parent_entity_id"
:
{
"type"
:
"string"
,
"maxLength"
:
32
},
"entity_type"
:
{
"type"
:
"string"
,
"maxLength"
:
64
},
"entity_path"
:
{
"type"
:
"string"
,
"maxLength"
:
2048
},
"ldap_id"
:
{
"type"
:
"string"
,
"maxLength"
:
255
},
"archival_agency"
:
{
"type"
:
"string"
,
"maxLength"
:
255
},
"archival_agreement"
:
{
"type"
:
"string"
,
"maxLength"
:
255
},
"entity_full_name"
:
{
"type"
:
"string"
}
}
}
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment