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

feat: wire default values into the api reference ui #1218

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

abvthecity
Copy link
Contributor

@abvthecity abvthecity commented Jul 30, 2024

Fixes FER-2226

Short description of the changes made

Wired up default values for primitive and enum types, which will render in the type shorthand

What was the motivation & context behind this PR?

to wire up the default values for for enums for uploadcare

How has this PR been tested?

  1. upgrade to >0.34.0
  2. fern generate --docs --preview on a site that has default values in their openapi specs
  3. pr preview
Screenshot 2024-07-30 at 2 38 36 PM

Copy link

vercel bot commented Jul 30, 2024

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

Name Status Preview Comments Updated (UTC)
fern-dashboard-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 30, 2024 5:09pm
fern-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 30, 2024 5:09pm
fern-prod ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 30, 2024 5:09pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
fern-dashboard ⬜️ Ignored (Inspect) Jul 30, 2024 5:09pm
fontawesome-cdn ⬜️ Ignored (Inspect) Visit Preview Jul 30, 2024 5:09pm
private-docs ⬜️ Ignored (Inspect) Jul 30, 2024 5:09pm

Copy link

linear bot commented Jul 30, 2024

FER-2226 [AssemblyAI, Uploadcare, Cohere] Support default values for enums

https://app.usepylon.com/issues?conversationID=73f54a19-81bb-4156-8fb1-21e2f2919ab4

We currently don't support encoding a default value for an enum. We need to decide if the default goes on the enum itself or on a type reference:

Sort: 
 default: desc
 enum: 
  - asc
  - desc

or

query-parameters: 
  sort: 
    type: Sort
    default: desc

@abvthecity abvthecity marked this pull request as ready for review July 30, 2024 14:22
@abvthecity abvthecity merged commit 373f7ef into main Jul 30, 2024
21 checks passed
@abvthecity abvthecity deleted the ajiang/wire-default-values-ui branch July 30, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants