Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
backoffice_server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
Factory
LLLE_Project
backoffice_server
Commits
0282b2d0
Commit
0282b2d0
authored
4 years ago
by
Rémi PAILHAREY
Browse files
Options
Downloads
Patches
Plain Diff
doc: added swagger doc about poll routes
parent
65572ad0
Branches
Branches containing commit
No related tags found
3 merge requests
!14
feat: addprices + subject managment
,
!11
feat: Add partners issue info
,
!5
Feat: Add backoffice
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/docs.go
+207
-1
207 additions, 1 deletion
docs/docs.go
docs/swagger.json
+207
-1
207 additions, 1 deletion
docs/swagger.json
docs/swagger.yaml
+137
-1
137 additions, 1 deletion
docs/swagger.yaml
with
551 additions
and
3 deletions
docs/docs.go
+
207
−
1
View file @
0282b2d0
...
...
@@ -50,6 +50,38 @@ var doc = `{
}
}
},
"put": {
"description": "Update a specific monthlyNews' content",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"monthlyNews"
],
"summary": "Update a specific monthlyNews' content",
"parameters": [
{
"description": "MonthlyNews to update with new content",
"name": "monthlyNews",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/monthlyNews.MonthlyNews"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/monthlyNews.MonthlyNews"
}
}
}
},
"post": {
"description": "Create a new monthlyNews",
"consumes": [
...
...
@@ -145,7 +177,164 @@ var doc = `{
],
"responses": {
"204": {
"description": "Sucessful delete",
"description": "Successful delete",
"schema": {
"type": "string"
}
}
}
}
},
"/api/admin/poll": {
"get": {
"description": "Get details of all polls",
"produces": [
"application/json"
],
"tags": [
"poll"
],
"summary": "List all polls",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/poll.Poll"
}
}
}
}
},
"put": {
"description": "Update a specific poll' content",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"poll"
],
"summary": "Update a specific poll' content",
"parameters": [
{
"description": "Poll to update with new content",
"name": "poll",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/poll.Poll"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/poll.Poll"
}
}
}
},
"post": {
"description": "Create a new poll",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"poll"
],
"summary": "Create a new poll",
"parameters": [
{
"description": "Poll to create",
"name": "poll",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/poll.Poll"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/poll.Poll"
}
}
}
}
},
"/api/admin/poll/{year}/{month}": {
"get": {
"description": "Get details of a specific poll",
"produces": [
"application/json"
],
"tags": [
"poll"
],
"summary": "Get details of a specific poll",
"parameters": [
{
"type": "integer",
"description": "Year of the poll",
"name": "year",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Month of the poll",
"name": "month",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/poll.Poll"
}
}
}
},
"delete": {
"description": "Delete a specific poll",
"produces": [
"application/json"
],
"tags": [
"poll"
],
"summary": "Delete a specific poll",
"parameters": [
{
"type": "integer",
"description": "Year of the poll",
"name": "year",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Month of the poll",
"name": "month",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "Successful delete",
"schema": {
"type": "string"
}
...
...
@@ -171,6 +360,23 @@ var doc = `{
"type": "integer"
}
}
},
"poll.Poll": {
"type": "object",
"properties": {
"link": {
"type": "string"
},
"month": {
"type": "integer"
},
"question": {
"type": "string"
},
"year": {
"type": "integer"
}
}
}
}
}`
...
...
This diff is collapsed.
Click to expand it.
docs/swagger.json
+
207
−
1
View file @
0282b2d0
...
...
@@ -35,6 +35,38 @@
}
}
},
"put"
:
{
"description"
:
"Update a specific monthlyNews' content"
,
"consumes"
:
[
"application/json"
],
"produces"
:
[
"application/json"
],
"tags"
:
[
"monthlyNews"
],
"summary"
:
"Update a specific monthlyNews' content"
,
"parameters"
:
[
{
"description"
:
"MonthlyNews to update with new content"
,
"name"
:
"monthlyNews"
,
"in"
:
"body"
,
"required"
:
true
,
"schema"
:
{
"$ref"
:
"#/definitions/monthlyNews.MonthlyNews"
}
}
],
"responses"
:
{
"200"
:
{
"description"
:
"OK"
,
"schema"
:
{
"$ref"
:
"#/definitions/monthlyNews.MonthlyNews"
}
}
}
},
"post"
:
{
"description"
:
"Create a new monthlyNews"
,
"consumes"
:
[
...
...
@@ -130,7 +162,164 @@
],
"responses"
:
{
"204"
:
{
"description"
:
"Sucessful delete"
,
"description"
:
"Successful delete"
,
"schema"
:
{
"type"
:
"string"
}
}
}
}
},
"/api/admin/poll"
:
{
"get"
:
{
"description"
:
"Get details of all polls"
,
"produces"
:
[
"application/json"
],
"tags"
:
[
"poll"
],
"summary"
:
"List all polls"
,
"responses"
:
{
"200"
:
{
"description"
:
"OK"
,
"schema"
:
{
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"#/definitions/poll.Poll"
}
}
}
}
},
"put"
:
{
"description"
:
"Update a specific poll' content"
,
"consumes"
:
[
"application/json"
],
"produces"
:
[
"application/json"
],
"tags"
:
[
"poll"
],
"summary"
:
"Update a specific poll' content"
,
"parameters"
:
[
{
"description"
:
"Poll to update with new content"
,
"name"
:
"poll"
,
"in"
:
"body"
,
"required"
:
true
,
"schema"
:
{
"$ref"
:
"#/definitions/poll.Poll"
}
}
],
"responses"
:
{
"200"
:
{
"description"
:
"OK"
,
"schema"
:
{
"$ref"
:
"#/definitions/poll.Poll"
}
}
}
},
"post"
:
{
"description"
:
"Create a new poll"
,
"consumes"
:
[
"application/json"
],
"produces"
:
[
"application/json"
],
"tags"
:
[
"poll"
],
"summary"
:
"Create a new poll"
,
"parameters"
:
[
{
"description"
:
"Poll to create"
,
"name"
:
"poll"
,
"in"
:
"body"
,
"required"
:
true
,
"schema"
:
{
"$ref"
:
"#/definitions/poll.Poll"
}
}
],
"responses"
:
{
"201"
:
{
"description"
:
"Created"
,
"schema"
:
{
"$ref"
:
"#/definitions/poll.Poll"
}
}
}
}
},
"/api/admin/poll/{year}/{month}"
:
{
"get"
:
{
"description"
:
"Get details of a specific poll"
,
"produces"
:
[
"application/json"
],
"tags"
:
[
"poll"
],
"summary"
:
"Get details of a specific poll"
,
"parameters"
:
[
{
"type"
:
"integer"
,
"description"
:
"Year of the poll"
,
"name"
:
"year"
,
"in"
:
"path"
,
"required"
:
true
},
{
"type"
:
"integer"
,
"description"
:
"Month of the poll"
,
"name"
:
"month"
,
"in"
:
"path"
,
"required"
:
true
}
],
"responses"
:
{
"200"
:
{
"description"
:
"OK"
,
"schema"
:
{
"$ref"
:
"#/definitions/poll.Poll"
}
}
}
},
"delete"
:
{
"description"
:
"Delete a specific poll"
,
"produces"
:
[
"application/json"
],
"tags"
:
[
"poll"
],
"summary"
:
"Delete a specific poll"
,
"parameters"
:
[
{
"type"
:
"integer"
,
"description"
:
"Year of the poll"
,
"name"
:
"year"
,
"in"
:
"path"
,
"required"
:
true
},
{
"type"
:
"integer"
,
"description"
:
"Month of the poll"
,
"name"
:
"month"
,
"in"
:
"path"
,
"required"
:
true
}
],
"responses"
:
{
"204"
:
{
"description"
:
"Successful delete"
,
"schema"
:
{
"type"
:
"string"
}
...
...
@@ -156,6 +345,23 @@
"type"
:
"integer"
}
}
},
"poll.Poll"
:
{
"type"
:
"object"
,
"properties"
:
{
"link"
:
{
"type"
:
"string"
},
"month"
:
{
"type"
:
"integer"
},
"question"
:
{
"type"
:
"string"
},
"year"
:
{
"type"
:
"integer"
}
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
docs/swagger.yaml
+
137
−
1
View file @
0282b2d0
...
...
@@ -11,6 +11,17 @@ definitions:
year
:
type
:
integer
type
:
object
poll.Poll
:
properties
:
link
:
type
:
string
month
:
type
:
integer
question
:
type
:
string
year
:
type
:
integer
type
:
object
host
:
localhost:1443
info
:
contact
:
...
...
@@ -57,6 +68,27 @@ paths:
summary
:
Create a new monthlyNews
tags
:
-
monthlyNews
put
:
consumes
:
-
application/json
description
:
Update a specific monthlyNews' content
parameters
:
-
description
:
MonthlyNews to update with new content
in
:
body
name
:
monthlyNews
required
:
true
schema
:
$ref
:
'
#/definitions/monthlyNews.MonthlyNews'
produces
:
-
application/json
responses
:
"
200"
:
description
:
OK
schema
:
$ref
:
'
#/definitions/monthlyNews.MonthlyNews'
summary
:
Update a specific monthlyNews' content
tags
:
-
monthlyNews
/api/admin/monthlyNews/{year}/{month}
:
delete
:
description
:
Delete a specific monthlyNews
...
...
@@ -75,7 +107,7 @@ paths:
-
application/json
responses
:
"
204"
:
description
:
Sucessful delete
description
:
Suc
c
essful delete
schema
:
type
:
string
summary
:
Delete a specific monthlyNews
...
...
@@ -104,4 +136,108 @@ paths:
summary
:
Get details of a specific monthlyNews
tags
:
-
monthlyNews
/api/admin/poll
:
get
:
description
:
Get details of all polls
produces
:
-
application/json
responses
:
"
200"
:
description
:
OK
schema
:
items
:
$ref
:
'
#/definitions/poll.Poll'
type
:
array
summary
:
List all polls
tags
:
-
poll
post
:
consumes
:
-
application/json
description
:
Create a new poll
parameters
:
-
description
:
Poll to create
in
:
body
name
:
poll
required
:
true
schema
:
$ref
:
'
#/definitions/poll.Poll'
produces
:
-
application/json
responses
:
"
201"
:
description
:
Created
schema
:
$ref
:
'
#/definitions/poll.Poll'
summary
:
Create a new poll
tags
:
-
poll
put
:
consumes
:
-
application/json
description
:
Update a specific poll' content
parameters
:
-
description
:
Poll to update with new content
in
:
body
name
:
poll
required
:
true
schema
:
$ref
:
'
#/definitions/poll.Poll'
produces
:
-
application/json
responses
:
"
200"
:
description
:
OK
schema
:
$ref
:
'
#/definitions/poll.Poll'
summary
:
Update a specific poll' content
tags
:
-
poll
/api/admin/poll/{year}/{month}
:
delete
:
description
:
Delete a specific poll
parameters
:
-
description
:
Year of the poll
in
:
path
name
:
year
required
:
true
type
:
integer
-
description
:
Month of the poll
in
:
path
name
:
month
required
:
true
type
:
integer
produces
:
-
application/json
responses
:
"
204"
:
description
:
Successful delete
schema
:
type
:
string
summary
:
Delete a specific poll
tags
:
-
poll
get
:
description
:
Get details of a specific poll
parameters
:
-
description
:
Year of the poll
in
:
path
name
:
year
required
:
true
type
:
integer
-
description
:
Month of the poll
in
:
path
name
:
month
required
:
true
type
:
integer
produces
:
-
application/json
responses
:
"
200"
:
description
:
OK
schema
:
$ref
:
'
#/definitions/poll.Poll'
summary
:
Get details of a specific poll
tags
:
-
poll
swagger
:
"
2.0"
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