-
Notifications
You must be signed in to change notification settings - Fork 18
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
chore(api-spec): update session endpoint specs #110
base: main
Are you sure you want to change the base?
Conversation
format: date-time | ||
audience: | ||
description: "The intended audience of the token." | ||
type: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is currently an array of strings, so:
type: string | |
type: array | |
items: | |
type: string |
description: "The email address associated with the token's subject, if available." | ||
type: string | ||
format: email |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is currently an object with address
, is_primary
, is_verified
so maybe something like (hope formatting works out):
description: "The email address associated with the token's subject, if available." | |
type: string | |
format: email | |
description: "Data about the email address associated with the token's subject, if available." | |
type: object | |
properties: | |
address: | |
description: "The actual email address." | |
type: string | |
format: email | |
is_primary: | |
description: "Indicates whether the email address is the primary address." | |
type: boolean | |
is_verified: | |
description: "Indicates whether the email address is verified." | |
type: boolean |
@@ -1049,10 +1055,14 @@ components: | |||
description: Date-time indicating the expiration of the session | |||
type: string | |||
format: date-time | |||
deprecated: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mintlify now actually shows deprecated
badges for some schema properties (not on schemas for endpoint operations though 🙄 ). This is good but I feel this is still not enough info:
Should we also mention in the description which other properties this one has been deprecated in favor of (in this case it would be claims.expiration
, I guess)? Otherwise I wouldn't know what property I need to use.
user_id: | ||
description: The ID of the user the session is associated with | ||
type: string | ||
format: uuid4 | ||
deprecated: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above.
Description
This PR updates the OpenAPI specification for the session endpoints to align the response definitions to the API changes made in teamhanko/hanko#2003 .
Changes Made
Endpoint Response Updates:
500
responses (InternalServerError
) to theGET /sessions/validate
andPOST /sessions/validate
endpoints for better documentation of potential server errors.400
responses (BadRequest
) for these endpoints.Schema Enhancements:
JWTClaims
, to describe the claims extracted from JWTs.subject
,issued_at
,expiration
,audience
,issuer
,email
, andsession_id
.ValidateSessionResponse
schema:expires_at
user_id
Notes
JWTClaims
schema as the deprecated fields will be removed in a future release.