API to receive an email address and set it (#2095)

* Generate swagger code for new endpoints
* Implemetn swagger APIs
* Add unit tests
This commit is contained in:
Javier Adriel
2022-06-09 18:13:46 -05:00
committed by GitHub
parent 5a8e029005
commit c509e5db70
25 changed files with 2400 additions and 0 deletions

View File

@@ -310,6 +310,103 @@ func init() {
}
}
},
"/mp-integration": {
"get": {
"tags": [
"OperatorAPI"
],
"summary": "Returns email registered for marketplace integration",
"operationId": "GetMPIntegration",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/mpIntegration"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"post": {
"tags": [
"OperatorAPI"
],
"summary": "Set email to register for marketplace integration",
"operationId": "PostMPIntegration",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/mpIntegration"
}
}
],
"responses": {
"201": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"delete": {
"tags": [
"OperatorAPI"
],
"summary": "Delete email registered for marketplace integration",
"operationId": "DeleteMPIntegration",
"responses": {
"204": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"patch": {
"tags": [
"OperatorAPI"
],
"summary": "Update email registered for marketplace integration",
"operationId": "PatchMPIntegration",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/mpIntegration"
}
}
],
"responses": {
"200": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/namespace": {
"post": {
"tags": [
@@ -3302,6 +3399,14 @@ func init() {
}
}
},
"mpIntegration": {
"type": "object",
"properties": {
"email": {
"type": "string"
}
}
},
"namespace": {
"type": "object",
"required": [
@@ -4914,6 +5019,103 @@ func init() {
}
}
},
"/mp-integration": {
"get": {
"tags": [
"OperatorAPI"
],
"summary": "Returns email registered for marketplace integration",
"operationId": "GetMPIntegration",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/mpIntegration"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"post": {
"tags": [
"OperatorAPI"
],
"summary": "Set email to register for marketplace integration",
"operationId": "PostMPIntegration",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/mpIntegration"
}
}
],
"responses": {
"201": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"delete": {
"tags": [
"OperatorAPI"
],
"summary": "Delete email registered for marketplace integration",
"operationId": "DeleteMPIntegration",
"responses": {
"204": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"patch": {
"tags": [
"OperatorAPI"
],
"summary": "Update email registered for marketplace integration",
"operationId": "PatchMPIntegration",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/mpIntegration"
}
}
],
"responses": {
"200": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/namespace": {
"post": {
"tags": [
@@ -8737,6 +8939,14 @@ func init() {
}
}
},
"mpIntegration": {
"type": "object",
"properties": {
"email": {
"type": "string"
}
}
},
"namespace": {
"type": "object",
"required": [