Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix : migration swagger params #25

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions websrc/controllers/migrationNoSqlHandlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func MigrationDynamoDBToFirestorePostHandler(ctx echo.Context) error {
// @Accept json
// @Produce json
// @Param AWSMigrationParams body AWSMigrationParams true "Parameters required for AWS migration"
// @Param NCPMigrationParams body NCPMigrationParams true "Parameters required for NCP migration"
// @Param MongoMigrationParams body MongoMigrationParams true "Parameters required for NCP migration"
// @Success 200 {object} models.BasicResponse "Successfully migrated data"
// @Failure 500 {object} models.BasicResponse "Internal Server Error"
// @Router /migration/dynamodb/mongodb [post]
Expand Down Expand Up @@ -230,7 +230,7 @@ func MigrationFirestoreToDynamoDBPostHandler(ctx echo.Context) error {
// @Accept multipart/form-data
// @Produce json
// @Param GCPMigrationParams body GCPMigrationParams true "Parameters required for GCP migration"
// @Param NCPMigrationParams body NCPMigrationParams true "Parameters required for NCP migration"
// @Param MongoMigrationParams body MongoMigrationParams true "Parameters required for NCP migration"
// @Param gcpCredential formData file true "Parameters required to generate test data"
// @Success 200 {object} models.BasicResponse "Successfully migrated data"
// @Failure 500 {object} models.BasicResponse "Internal Server Error"
Expand Down Expand Up @@ -299,7 +299,7 @@ func MigrationFirestoreToMongoDBPostHandler(ctx echo.Context) error {
// @Tags [Data Migration]
// @Accept json
// @Produce json
// @Param NCPMigrationParams body NCPMigrationParams true "Parameters required for NCP migration"
// @Param MongoMigrationParams body MongoMigrationParams true "Parameters required for NCP migration"
// @Param AWSMigrationParams body AWSMigrationParams true "Parameters required for AWS migration"
// @Success 200 {object} models.BasicResponse "Successfully migrated data"
// @Failure 500 {object} models.BasicResponse "Internal Server Error"
Expand Down Expand Up @@ -359,7 +359,7 @@ func MigrationMongoDBToDynamoDBPostHandler(ctx echo.Context) error {
// @Tags [Data Migration]
// @Accept multipart/form-data
// @Produce json
// @Param NCPMigrationParams body NCPMigrationParams true "Parameters required for NCP migration"
// @Param MongoMigrationParams body MongoMigrationParams true "Parameters required for NCP migration"
// @Param GCPMigrationParams body GCPMigrationParams true "Parameters required for GCP migration"
// @Param gcpCredential formData file true "Parameters required to generate test data"
// @Success 200 {object} models.BasicResponse "Successfully migrated data"
Expand Down
36 changes: 28 additions & 8 deletions websrc/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -802,11 +802,11 @@ const docTemplate = `{
},
{
"description": "Parameters required for NCP migration",
"name": "NCPMigrationParams",
"name": "MongoMigrationParams",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/controllers.NCPMigrationParams"
"$ref": "#/definitions/controllers.MongoMigrationParams"
}
}
],
Expand Down Expand Up @@ -907,11 +907,11 @@ const docTemplate = `{
},
{
"description": "Parameters required for NCP migration",
"name": "NCPMigrationParams",
"name": "MongoMigrationParams",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/controllers.NCPMigrationParams"
"$ref": "#/definitions/controllers.MongoMigrationParams"
}
},
{
Expand Down Expand Up @@ -2499,11 +2499,11 @@ const docTemplate = `{
"parameters": [
{
"description": "Parameters required for NCP migration",
"name": "NCPMigrationParams",
"name": "MongoMigrationParams",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/controllers.NCPMigrationParams"
"$ref": "#/definitions/controllers.MongoMigrationParams"
}
},
{
Expand Down Expand Up @@ -2548,11 +2548,11 @@ const docTemplate = `{
"parameters": [
{
"description": "Parameters required for NCP migration",
"name": "NCPMigrationParams",
"name": "MongoMigrationParams",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/controllers.NCPMigrationParams"
"$ref": "#/definitions/controllers.MongoMigrationParams"
}
},
{
Expand Down Expand Up @@ -2834,6 +2834,26 @@ const docTemplate = `{
}
}
},
"controllers.MongoMigrationParams": {
"type": "object",
"properties": {
"databaseName": {
"type": "string"
},
"host": {
"type": "string"
},
"password": {
"type": "string"
},
"port": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"controllers.NCPMigrationParams": {
"type": "object",
"properties": {
Expand Down
36 changes: 28 additions & 8 deletions websrc/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -795,11 +795,11 @@
},
{
"description": "Parameters required for NCP migration",
"name": "NCPMigrationParams",
"name": "MongoMigrationParams",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/controllers.NCPMigrationParams"
"$ref": "#/definitions/controllers.MongoMigrationParams"
}
}
],
Expand Down Expand Up @@ -900,11 +900,11 @@
},
{
"description": "Parameters required for NCP migration",
"name": "NCPMigrationParams",
"name": "MongoMigrationParams",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/controllers.NCPMigrationParams"
"$ref": "#/definitions/controllers.MongoMigrationParams"
}
},
{
Expand Down Expand Up @@ -2492,11 +2492,11 @@
"parameters": [
{
"description": "Parameters required for NCP migration",
"name": "NCPMigrationParams",
"name": "MongoMigrationParams",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/controllers.NCPMigrationParams"
"$ref": "#/definitions/controllers.MongoMigrationParams"
}
},
{
Expand Down Expand Up @@ -2541,11 +2541,11 @@
"parameters": [
{
"description": "Parameters required for NCP migration",
"name": "NCPMigrationParams",
"name": "MongoMigrationParams",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/controllers.NCPMigrationParams"
"$ref": "#/definitions/controllers.MongoMigrationParams"
}
},
{
Expand Down Expand Up @@ -2827,6 +2827,26 @@
}
}
},
"controllers.MongoMigrationParams": {
"type": "object",
"properties": {
"databaseName": {
"type": "string"
},
"host": {
"type": "string"
},
"password": {
"type": "string"
},
"port": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"controllers.NCPMigrationParams": {
"type": "object",
"properties": {
Expand Down
29 changes: 21 additions & 8 deletions websrc/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,19 @@ definitions:
srcUsername:
type: string
type: object
controllers.MongoMigrationParams:
properties:
databaseName:
type: string
host:
type: string
password:
type: string
port:
type: string
username:
type: string
type: object
controllers.NCPMigrationParams:
properties:
ncpAccessKey:
Expand Down Expand Up @@ -683,10 +696,10 @@ paths:
$ref: '#/definitions/controllers.AWSMigrationParams'
- description: Parameters required for NCP migration
in: body
name: NCPMigrationParams
name: MongoMigrationParams
required: true
schema:
$ref: '#/definitions/controllers.NCPMigrationParams'
$ref: '#/definitions/controllers.MongoMigrationParams'
produces:
- application/json
responses:
Expand Down Expand Up @@ -752,10 +765,10 @@ paths:
$ref: '#/definitions/controllers.GCPMigrationParams'
- description: Parameters required for NCP migration
in: body
name: NCPMigrationParams
name: MongoMigrationParams
required: true
schema:
$ref: '#/definitions/controllers.NCPMigrationParams'
$ref: '#/definitions/controllers.MongoMigrationParams'
- description: Parameters required to generate test data
in: formData
name: gcpCredential
Expand Down Expand Up @@ -1755,10 +1768,10 @@ paths:
parameters:
- description: Parameters required for NCP migration
in: body
name: NCPMigrationParams
name: MongoMigrationParams
required: true
schema:
$ref: '#/definitions/controllers.NCPMigrationParams'
$ref: '#/definitions/controllers.MongoMigrationParams'
- description: Parameters required for AWS migration
in: body
name: AWSMigrationParams
Expand Down Expand Up @@ -1787,10 +1800,10 @@ paths:
parameters:
- description: Parameters required for NCP migration
in: body
name: NCPMigrationParams
name: MongoMigrationParams
required: true
schema:
$ref: '#/definitions/controllers.NCPMigrationParams'
$ref: '#/definitions/controllers.MongoMigrationParams'
- description: Parameters required for GCP migration
in: body
name: GCPMigrationParams
Expand Down
Loading