Skip to content

Commit

Permalink
Deploying to gh-pages from @ afcf765 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaptoss committed Sep 12, 2024
1 parent 9f790ce commit f5527db
Show file tree
Hide file tree
Showing 2 changed files with 338 additions and 0 deletions.
202 changes: 202 additions & 0 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,49 @@
}
}
},
"/integrations/geo-forms-svc/v1/image/{id}": {
"get": {
"tags": [
"User form"
],
"summary": "Get market",
"description": "Get single market",
"parameters": [
{
"$ref": "#/components/parameters/pathID"
},
{
"in": "query",
"name": "api",
"required": true,
"schema": {
"type": "string",
"example": "dc3d2b96-9ff1-4f54-9fb6-005a518089fe",
"description": "Api key for limit access to images"
}
}
],
"operationId": "getImage",
"responses": {
"302": {
"description": "OK"
},
"403": {
"description": "You must provide a valid api key.",
"content": {
"application/vnd.api+json": {
"schema": {
"$ref": "#/components/schemas/Errors"
}
}
}
},
"500": {
"$ref": "#/components/responses/internalError"
}
}
}
},
"/integrations/geo-forms-svc/v1/status/{id}": {
"get": {
"tags": [
Expand Down Expand Up @@ -336,6 +379,77 @@
}
}
}
},
"/integrations/geo-forms-svc/v2/image": {
"post": {
"tags": [
"User form"
],
"summary": "Generate two pre-signed urls",
"description": "Generate pre-signed URL for the provided content-length \nand content-type for selfie and passport image, with a configurable lifetime. \nThe response contains a URL with a signature and \nother information that should be used to upload image \nin S3 Storage. The name is generated on the server side.\n'verified: true' must be specified in the JWT.\nThe cooldown of this endpoint is the same as in the submit form.\nThis endpoint creates an empty form that can be submitted on `/form`\n",
"operationId": "uploadImageV2",
"security": [
{
"BearerAuth": []
}
],
"requestBody": {
"content": {
"application/vnd.api+json": {
"schema": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/UploadImageV2"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/vnd.api+json": {
"schema": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"$ref": "#/components/schemas/UploadImageResponseV2"
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/invalidParameter"
},
"401": {
"$ref": "#/components/responses/invalidAuth"
},
"429": {
"description": "It is necessary to wait some time before sending the next form",
"content": {
"application/vnd.api+json": {
"schema": {
"$ref": "#/components/schemas/Errors"
}
}
}
},
"500": {
"$ref": "#/components/responses/internalError"
}
}
}
}
},
"components": {
Expand Down Expand Up @@ -481,6 +595,11 @@
"description": "base64 encoded image with max size 4 MB or\nURL for S3 storage with image up to 4 mb\n",
"example": "https://geoforms.nyc3.digitaloceanspaces.com/awesome_phono.jpg"
},
"passport_image": {
"type": "string",
"description": "base64 encoded image with max size 4 MB or\nURL for S3 storage with image up to 4 mb\n",
"example": "https://geoforms.nyc3.digitaloceanspaces.com/awesome_phono.jpg"
},
"created_at": {
"type": "integer",
"format": "int64",
Expand Down Expand Up @@ -530,6 +649,26 @@
}
}
},
"ImageData": {
"type": "object",
"required": [
"content_type",
"content_length"
],
"properties": {
"content_type": {
"type": "string",
"example": "image/png",
"description": "Allowed content-type is `image/png`, `image/jpeg` or `image/x-jp2`"
},
"content_length": {
"type": "integer",
"format": "int64",
"example": 150000,
"description": "Image size. It cannot be more than 4 megabytes."
}
}
},
"UploadImage": {
"allOf": [
{
Expand Down Expand Up @@ -626,6 +765,69 @@
]
}
}
},
"UploadImageResponseV2": {
"allOf": [
{
"$ref": "#/components/schemas/UploadImageResponseKey"
},
{
"type": "object",
"required": [
"attributes"
],
"properties": {
"attributes": {
"type": "object",
"required": [
"selfie_image_url"
],
"properties": {
"selfie_image_url": {
"type": "string",
"description": "Pre-signed URL to upload the file",
"example": "https://bucket.nyc3.digitaloceanspaces.com/somefile?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=DO00PTJRCBZELX6E4EEK%2F20240722%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240722T133921Z&X-Amz-Expires=300&X-Amz-SignedHeaders=host&X-Amz-Signature=940c9058b90e8836b03470fdb51af1f24baabc16a7a83b80352d3d618aa4f23f"
},
"passport_image_url": {
"type": "string",
"description": "Pre-signed URL to upload the file",
"example": "https://bucket.nyc3.digitaloceanspaces.com/somefile?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=DO00PTJRCBZELX6E4EEK%2F20240722%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240722T133921Z&X-Amz-Expires=300&X-Amz-SignedHeaders=host&X-Amz-Signature=940c9058b90e8836b03470fdb51af1f24baabc16a7a83b80352d3d618aa4f23f"
}
}
}
}
}
]
},
"UploadImageV2": {
"allOf": [
{
"$ref": "#/components/schemas/UploadImageKey"
},
{
"type": "object",
"x-go-is-request": true,
"required": [
"attributes"
],
"properties": {
"attributes": {
"type": "object",
"required": [
"selfie_image"
],
"properties": {
"selfie_image": {
"$ref": "#/components/schemas/ImageData"
},
"passport_image": {
"$ref": "#/components/schemas/ImageData"
}
}
}
}
}
]
}
},
"responses": {
Expand Down
Loading

0 comments on commit f5527db

Please sign in to comment.