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

docs: Auth tag #4126

Merged
merged 11 commits into from
Jul 4, 2023
Merged

docs: Auth tag #4126

merged 11 commits into from
Jul 4, 2023

Conversation

chriswk
Copy link
Contributor

@chriswk chriswk commented Jun 30, 2023

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.

@vercel
Copy link

vercel bot commented Jun 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 4, 2023 8:24am
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 4, 2023 8:24am

Copy link
Contributor

@thomasheartman thomasheartman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! 💯 I've got a few small tweaks suggested, but I trust you to take care of them before merging 🏆

},
password: {
type: 'string',
description: 'The new password for the user',
example: 'correct horse battery staple',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love the reference 🤓

src/lib/openapi/spec/login-schema.ts Outdated Show resolved Hide resolved
src/lib/openapi/spec/login-schema.ts Outdated Show resolved Hide resolved
type: 'string',
example: 'hunter2',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also very good 🙌🏼

src/lib/openapi/spec/role-schema.ts Outdated Show resolved Hide resolved
src/lib/routes/auth/reset-password-controller.ts Outdated Show resolved Hide resolved
src/lib/routes/auth/reset-password-controller.ts Outdated Show resolved Hide resolved
src/lib/routes/auth/reset-password-controller.ts Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the endpoints here also need to update their response codes. They only list successful codes for now. What about 401, 403,415, etc?

src/lib/routes/auth/simple-password-provider.ts Outdated Show resolved Hide resolved
Christopher Kolstad and others added 7 commits July 4, 2023 09:43
Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants