Skip to content

Commit

Permalink
[#IOPID-1838] Edited openapi spec
Browse files Browse the repository at this point in the history
  • Loading branch information
arcogabbo committed May 16, 2024
1 parent c24bf38 commit 7856afe
Showing 1 changed file with 84 additions and 17 deletions.
101 changes: 84 additions & 17 deletions openapi/external.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,99 @@ servers:
paths:
/validate-profile-email:
get:
operationId: validateProfileEmail
description: Validate the email
operationId: validateTokenAndRedirect
description: |
This method only validates the token and redirect the user to the confirm/error page.
parameters:
- in: query
name: token
required: true
schema:
type: string
minLength: 1
- in: query
name: flow
description: |
CONFIRM -> verify token and on success redirect to confirm page
VALIDATE -> verify token and on success redirect to result page
schema:
type: string
enum:
- "CONFIRM"
- "VALIDATE"
default: "CONFIRM"
$ref: "#/components/schemas/ValidationToken"
responses:
"303":
description: See Others
"400":
description: Validation Failed
"404":
description: Not Found
put:
operationId: validateProfileEmail
description: |
Validates the token and updates the user profile.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ValidateUserEmailPayload"
responses:
"204":
description: Email successfully validated.
"400":
description: Validation failed
"500":
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ProblemJson'

components:
schemas:
ValidationToken:
type: string
pattern: "^[A-Za-z0-9]{26}:[A-Fa-f0-9]{24}$"
example: "01DPT9QAZ6N0FJX21A86FRCWB3:8c652f8566ba53bd8cf0b1b9"
ValidateUserEmailPayload:
type: object
properties:
token:
$ref: "#/components/schemas/ValidationToken"
required:
- token
ProblemJson:
type: object
properties:
type:
type: string
format: uri
description: |-
An absolute URI that identifies the problem type. When dereferenced,
it SHOULD provide human-readable documentation for the problem type
(e.g., using HTML).
default: about:blank
example: https://example.com/problem/constraint-violation
title:
type: string
description: >-
A short, summary of the problem type. Written in english and
readable
for engineers (usually not suited for non technical stakeholders and
not localized); example: Service Unavailable
status:
type: integer
format: int32
description: >-
The HTTP status code generated by the origin server for this
occurrence
of the problem.
minimum: 100
maximum: 600
exclusiveMaximum: true
example: 200
detail:
type: string
description: |-
A human readable explanation specific to this occurrence of the
problem.
example: There was an error processing the request
instance:
type: string
format: uri
description: >-
An absolute URI that identifies the specific occurrence of the
problem.
It may or may not yield further information if dereferenced.

0 comments on commit 7856afe

Please sign in to comment.