-
Notifications
You must be signed in to change notification settings - Fork 133
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: new scalarParse translation function #1418
Conversation
|
93d67d0
to
d613038
Compare
Job #959: Bundle Size — 1.97MiB (+2.77%).Warning Bundle contains 4 duplicate packages – View duplicate packages Warning Bundle introduced one new package: zod – View changed packages Bundle metrics
|
Current Job #959 |
Baseline Job #954 |
|
---|---|---|
Initial JS | 1.97MiB (+2.77% ) |
1.92MiB |
Initial CSS | 0B |
0B |
Cache Invalidation | 100% |
100% |
Chunks | 1 |
1 |
Assets | 1 |
1 |
Modules | 1044 (+0.19% ) |
1042 |
Duplicate Modules | 0 |
0 |
Duplicate Code | 0% |
0% |
Packages | 159 (+0.63% ) |
158 |
Duplicate Packages | 4 |
4 |
Bundle size by type 1 change
1 regression
Current Job #959 |
Baseline Job #954 |
|
---|---|---|
JS | 1.97MiB (+2.77% ) |
1.92MiB |
View job #959 report View tom/doc-1637-scalarparse branch activity View project dashboard
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.
We should break all the test files out into a separate repo so it can just be installed as a dev depedency and keep the spec files out of the main repo.
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.
Moved these test files to the CDN for now while we figure out the best way to break out the test files
Great work already! Shouldn’t we keep this in @scalar/api-reference, though? It’s not useful for other people, |
The only downside I see to this is adding a dependency to @scalar/api-reference but I would defer to @marclave and @geoffgscott for this decision. |
Dumb question: What dependency do we need to add to @scalar/api-reference? 😳 |
@scalar/api-reference would need to import oas-utils to use this new translation function with the current package setup @hanspagel but it looks like it is already using this package so there would actually be no change. |
I’m sorry to say this, but I think we should close this PR. It got a bunch of conflicts and we might get even more with the upcoming merge of The Secret Project(tm). 😬 |
lets close this, sorry we didnt get this in sooner @tmastrom but we can defs cherry pick a lot of this work post "The Secret Project(tm). " :) |
This PR adds
scalarParse
tooas-utils
to convert the output of the parser into a more usable data object for rendering. The translation layer dereferences and groups fields for rendering as well as creates new zod schemas for parsing incoming data. We want to allow malformed data as much as possible to render what we can.The
parse.ts
function is removed from@scalar/api-reference
and replaced with the newscalarParse
functionTodo