-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2174678
commit 1c9bc49
Showing
9 changed files
with
621 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,229 @@ | ||
// Package docs Code generated by swaggo/swag. DO NOT EDIT | ||
package docs | ||
|
||
import "github.com/swaggo/swag" | ||
|
||
const docTemplate = `{ | ||
"schemes": {{ marshal .Schemes }}, | ||
"swagger": "2.0", | ||
"info": { | ||
"description": "{{escape .Description}}", | ||
"title": "{{.Title}}", | ||
"contact": { | ||
"name": "ISD Team", | ||
"email": "sd.team.sgcu@gmail.com" | ||
}, | ||
"version": "{{.Version}}" | ||
}, | ||
"host": "{{.Host}}", | ||
"basePath": "{{.BasePath}}", | ||
"paths": { | ||
"/v1/auth/signup": { | ||
"post": { | ||
"description": "Return the data of user if successfully", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"auth" | ||
], | ||
"summary": "Signup user", | ||
"parameters": [ | ||
{ | ||
"description": "signup request dto", | ||
"name": "signup", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/dto.SignupRequest" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"201": { | ||
"description": "Created", | ||
"schema": { | ||
"$ref": "#/definitions/dto.SignupResponse" | ||
} | ||
}, | ||
"400": { | ||
"description": "Invalid request body", | ||
"schema": { | ||
"$ref": "#/definitions/dto.ResponseBadRequestErr" | ||
} | ||
}, | ||
"409": { | ||
"description": "Duplicate email", | ||
"schema": { | ||
"$ref": "#/definitions/dto.ResponseConflictErr" | ||
} | ||
}, | ||
"500": { | ||
"description": "Internal service error", | ||
"schema": { | ||
"$ref": "#/definitions/dto.ResponseInternalErr" | ||
} | ||
}, | ||
"503": { | ||
"description": "Service is down", | ||
"schema": { | ||
"$ref": "#/definitions/dto.ResponseServiceDownErr" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"dto.BadReqErrResponse": { | ||
"type": "object", | ||
"properties": { | ||
"failed_field": { | ||
"type": "string" | ||
}, | ||
"message": { | ||
"type": "string" | ||
}, | ||
"value": {} | ||
} | ||
}, | ||
"dto.ResponseBadRequestErr": { | ||
"type": "object", | ||
"properties": { | ||
"data": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/dto.BadReqErrResponse" | ||
} | ||
}, | ||
"message": { | ||
"type": "string", | ||
"example": "Invalid request body" | ||
}, | ||
"status_code": { | ||
"type": "integer", | ||
"example": 400 | ||
} | ||
} | ||
}, | ||
"dto.ResponseConflictErr": { | ||
"type": "object", | ||
"properties": { | ||
"data": {}, | ||
"message": { | ||
"type": "string", | ||
"example": "Conflict" | ||
}, | ||
"status_code": { | ||
"type": "integer", | ||
"example": 409 | ||
} | ||
} | ||
}, | ||
"dto.ResponseInternalErr": { | ||
"type": "object", | ||
"properties": { | ||
"data": {}, | ||
"message": { | ||
"type": "string", | ||
"example": "Internal service error" | ||
}, | ||
"status_code": { | ||
"type": "integer", | ||
"example": 500 | ||
} | ||
} | ||
}, | ||
"dto.ResponseServiceDownErr": { | ||
"type": "object", | ||
"properties": { | ||
"data": {}, | ||
"message": { | ||
"type": "string", | ||
"example": "Service is down" | ||
}, | ||
"status_code": { | ||
"type": "integer", | ||
"example": 503 | ||
} | ||
} | ||
}, | ||
"dto.SignupRequest": { | ||
"type": "object", | ||
"required": [ | ||
"email", | ||
"firstname", | ||
"lastname", | ||
"password" | ||
], | ||
"properties": { | ||
"email": { | ||
"type": "string" | ||
}, | ||
"firstname": { | ||
"type": "string" | ||
}, | ||
"lastname": { | ||
"type": "string" | ||
}, | ||
"password": { | ||
"type": "string", | ||
"maxLength": 30, | ||
"minLength": 6 | ||
} | ||
} | ||
}, | ||
"dto.SignupResponse": { | ||
"type": "object", | ||
"properties": { | ||
"email": { | ||
"type": "string" | ||
}, | ||
"firstname": { | ||
"type": "string" | ||
}, | ||
"id": { | ||
"type": "string" | ||
}, | ||
"lastname": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"securityDefinitions": { | ||
"AuthToken": { | ||
"description": "Description for what is this security definition being used", | ||
"type": "apiKey", | ||
"name": "Authorization", | ||
"in": "header" | ||
} | ||
}, | ||
"tags": [ | ||
{ | ||
"description": "# Auth Tag API Documentation\n**Auth** functions goes here", | ||
"name": "auth" | ||
} | ||
] | ||
}` | ||
|
||
// SwaggerInfo holds exported Swagger Info so clients can modify it | ||
var SwaggerInfo = &swag.Spec{ | ||
Version: "1.0", | ||
Host: "", | ||
BasePath: "", | ||
Schemes: []string{"https", "http"}, | ||
Title: "JohnJud API", | ||
Description: "# Johnjud API", | ||
InfoInstanceName: "swagger", | ||
SwaggerTemplate: docTemplate, | ||
LeftDelim: "{{", | ||
RightDelim: "}}", | ||
} | ||
|
||
func init() { | ||
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Johnjud API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auth Tag API Documentation | ||
**Auth** functions goes here |
Oops, something went wrong.