File tree 4 files changed +9
-9
lines changed
4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -644,8 +644,8 @@ const docTemplate = `{
644
644
}
645
645
],
646
646
"responses": {
647
- "200 ": {
648
- "description": "OK ",
647
+ "201 ": {
648
+ "description": "Created ",
649
649
"schema": {
650
650
"$ref": "#/definitions/codersdk.Parameter"
651
651
}
Original file line number Diff line number Diff line change 554
554
}
555
555
],
556
556
"responses" : {
557
- "200 " : {
558
- "description" : " OK " ,
557
+ "201 " : {
558
+ "description" : " Created " ,
559
559
"schema" : {
560
560
"$ref" : " #/definitions/codersdk.Parameter"
561
561
}
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ import (
27
27
// @Param request body codersdk.CreateParameterRequest true "Parameter request"
28
28
// @Param scope path string true "Scope" Enums(template,workspace,import_job)
29
29
// @Param id path string true "ID" format(uuid)
30
- // @Success 200 {object} codersdk.Parameter
30
+ // @Success 201 {object} codersdk.Parameter
31
31
// @Router /parameters/{scope}/{id} [post]
32
32
func (api * API ) postParameter (rw http.ResponseWriter , r * http.Request ) {
33
33
ctx := r .Context ()
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ curl -X POST http://coder-server:8080/api/v2/parameters/{scope}/{id} \
130
130
131
131
### Example responses
132
132
133
- > 200 Response
133
+ > 201 Response
134
134
135
135
``` json
136
136
{
@@ -147,9 +147,9 @@ curl -X POST http://coder-server:8080/api/v2/parameters/{scope}/{id} \
147
147
148
148
### Responses
149
149
150
- | Status | Meaning | Description | Schema |
151
- | ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------- |
152
- | 200 | [ OK ] ( https://tools.ietf.org/html/rfc7231#section-6.3.1 ) | OK | [ codersdk.Parameter] ( schemas.md#codersdkparameter ) |
150
+ | Status | Meaning | Description | Schema |
151
+ | ------ | ------------------------------------------------------------ | ----------- | -------------------------------------------------- |
152
+ | 201 | [ Created ] ( https://tools.ietf.org/html/rfc7231#section-6.3.2 ) | Created | [ codersdk.Parameter] ( schemas.md#codersdkparameter ) |
153
153
154
154
To perform this operation, you must be authenticated by means of one of the following methods: ** CoderSessionToken** .
155
155
You can’t perform that action at this time.
0 commit comments