File tree Expand file tree Collapse file tree 4 files changed +15
-13
lines changed
Expand file tree Collapse file tree 4 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,8 @@ const docTemplate = `{
4646 }
4747 ],
4848 "responses": {
49- "200 ": {
50- "description": "OK ",
49+ "202 ": {
50+ "description": "Accepted ",
5151 "schema": {
5252 "$ref": "#/definitions/ca.PostCSRResponse"
5353 }
Original file line number Diff line number Diff line change 4343 }
4444 ],
4545 "responses" : {
46- "200 " : {
47- "description" : " OK " ,
46+ "202 " : {
47+ "description" : " Accepted " ,
4848 "schema" : {
4949 "$ref" : " #/definitions/ca.PostCSRResponse"
5050 }
Original file line number Diff line number Diff line change 9898 produces :
9999 - application/json
100100 responses :
101- " 200 " :
102- description : OK
101+ " 202 " :
102+ description : Accepted
103103 schema :
104104 $ref : ' #/definitions/ca.PostCSRResponse'
105105 " 400 " :
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ type csrHandler struct {
2222// @Accept json
2323// @Produce json
2424// @Param request body ca.PostCSRRequest true "Request"
25- // @Success 200 {object} ca.PostCSRResponse
25+ // @Success 202 {object} ca.PostCSRResponse
2626// @Failure 400 {object} http.JSONErrorResponse
2727// @Failure 500 {object} http.JSONErrorResponse
2828// @Router /csr [post]
@@ -39,12 +39,14 @@ func (c *csrHandler) submit(ctx *fiber.Ctx) error {
3939 return err
4040 }
4141
42- return ctx .JSON (ca.PostCSRResponse {
43- RequestID : res .ID (),
44- Status : res .Status (),
45- Message : res .Status ().Description (),
46- Certificate : res .Certificate (),
47- })
42+ return ctx .
43+ Status (fiber .StatusAccepted ).
44+ JSON (ca.PostCSRResponse {
45+ RequestID : res .ID (),
46+ Status : res .Status (),
47+ Message : res .Status ().Description (),
48+ Certificate : res .Certificate (),
49+ })
4850}
4951
5052// @Summary Get CSR Status
You can’t perform that action at this time.
0 commit comments