1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-03-09 00:18:26 +01:00
unleash.unleash/src/lib/openapi/spec/email-schema.ts
Christopher Kolstad 0b18491237
docs: Auth tag (#4126)
## 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>
2023-07-04 08:31:54 +00:00

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>;