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 docs #10

Merged
merged 6 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
37 changes: 22 additions & 15 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions docs/spec/paths/integrations@geo-forms-svc@[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ post:
Sending the filled form. Requires created empty form
linked to the name of the file with the photo.

Only a user with a confirmed passport can send the form ('verified: true' in JWT).

The image is a link to s3 storage
operationId: lightweightSubmitForm
security:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
post:
tags:
- User form
summary: Submit user answers
summary: Legacy submit user answers
description: |
Send user answers and return their current status.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ post:
summary: Generate pre-signed url
description: |
Generate pre-signed URL for the provided content-length
and content-type, with a configurable lifetime.
and content-type, with a configurable lifetime in config.
kish1n marked this conversation as resolved.
Show resolved Hide resolved
The response contains a URL with a signature and
other information that should be used to upload image
in S3 Storage. The name is generated on the server side.
Expand Down
4 changes: 2 additions & 2 deletions docs/spec/paths/integrations@geo-forms-svc@v1@image@{id}.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
get:
tags:
- User form
summary: Get market
description: Get single market
summary: Get Image
description: Get single image by API key
kish1n marked this conversation as resolved.
Show resolved Hide resolved
parameters:
- $ref: '#/components/parameters/pathID'
- in: query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ get:
properties:
data:
$ref: '#/components/schemas/Form'
400:
$ref: '#/components/responses/invalidParameter'
401:
$ref: '#/components/responses/invalidAuth'
404:
$ref: '#/components/responses/notFound'
500:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ post:
summary: Generate two pre-signed urls
description: |
Generate pre-signed URL for the provided content-length
and content-type for selfie and passport image, with a configurable lifetime.
and content-type for selfie and passport image, with a configurable lifetime in config.
The response contains a URL with a signature and
other information that should be used to upload image
in S3 Storage. The name is generated on the server side.
Expand Down
2 changes: 1 addition & 1 deletion internal/service/requests/submit_form.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func NewSubmitForm(r *http.Request) (req resources.FormResponse, err error) {
"data/attributes/phone": validation.Validate(req.Data.Attributes.Phone, validation.Required),
"data/attributes/email": validation.Validate(req.Data.Attributes.Email, validation.Required, validation.Match(emailRegexp)),
"data/attributes/image": validation.Validate(req.Data.Attributes.Image, validation.Required, is.URL),
"data/attributes/paspport_image": validation.Validate(req.Data.Attributes.PassportImage, is.URL),
"data/attributes/passport_image": validation.Validate(req.Data.Attributes.PassportImage, is.URL),
}

return req, errs.Filter()
Expand Down
Loading