Skip to content

Commit cb45909

Browse files
author
Sylvain Delabye
committed
documentation: add the post method to the validation endpoint definition
1 parent 0585ef5 commit cb45909

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed

docs/source/_static/specs/formidable.js

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,28 @@ var spec = {
463463
},
464464
"/forms/{id}/validate/": {
465465
"get": {
466+
"parameters": [
467+
{
468+
"in": "path",
469+
"name": "id",
470+
"required": true,
471+
"type": "integer"
472+
}
473+
],
474+
"responses": {
475+
"204": {
476+
"description": "Validation OK"
477+
},
478+
"400": {
479+
"description": "Validation KO",
480+
"schema": {
481+
"$ref": "#/definitions/InputError"
482+
}
483+
}
484+
},
485+
"summary": "Validate a form (GET method). GET and POST are equivalent, but GET is deprecated."
486+
},
487+
"post": {
466488
"parameters": [
467489
{
468490
"in": "path",
@@ -482,7 +504,7 @@ var spec = {
482504
}
483505
}
484506
},
485-
"summary": "Validate a form"
507+
"summary": "Validate a form (POST method). GET and POST are equivalent."
486508
}
487509
}
488510
},

docs/swagger/formidable.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,21 @@ paths:
133133

134134
/forms/{id}/validate/:
135135
get:
136-
summary: Validate a form
136+
summary: Validate a form (GET method). GET and POST are equivalent.
137+
parameters:
138+
- name: id
139+
in: path
140+
type: integer
141+
required: true
142+
responses:
143+
204:
144+
description: Validation OK
145+
400:
146+
description: Validation KO
147+
schema:
148+
$ref: '#/definitions/InputError'
149+
post:
150+
summary: Validate a form (POST method). GET and POST are equivalent.
137151
parameters:
138152
- name: id
139153
in: path

0 commit comments

Comments
 (0)