mirror of
https://github.com/Unleash/unleash.git
synced 2025-03-09 00:18:26 +01:00
## What This adds openapi documentation for the Auth tagged operations and connected schemas. ## Discussion points Our user schema seems to be exposing quite a bit of internal fields, I flagged the isApi field as deprecated, I can imagine quite a few of these fields also being deprecated to prepare for removal in next major version, but I was unsure which ones were safe to do so with. ## Observation We have some technical debt around the shape of the schema we're claiming we're returning and what we actually are returning. I believe @gastonfournier also observed this when we turned on validation for our endpoints. --------- Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
21 lines
588 B
TypeScript
21 lines
588 B
TypeScript
import { FromSchema } from 'json-schema-to-ts';
|
|
|
|
export const emailSchema = {
|
|
$id: '#/components/schemas/emailSchema',
|
|
type: 'object',
|
|
additionalProperties: false,
|
|
required: ['email'],
|
|
description:
|
|
'Represents the email of a user. Used to send email communication (reset password, welcome mail etc)',
|
|
properties: {
|
|
email: {
|
|
description: 'The email address',
|
|
type: 'string',
|
|
example: 'test@example.com',
|
|
},
|
|
},
|
|
components: {},
|
|
} as const;
|
|
|
|
export type EmailSchema = FromSchema<typeof emailSchema>;
|