-
Notifications
You must be signed in to change notification settings - Fork 64
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(api-gen): allow multiple json overrides for schema #1566
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
@shopware/api-client
@shopware/api-gen
@shopware-pwa/cms-base
@shopware-pwa/composables-next
@shopware-pwa/helpers-next
@shopware-pwa/nuxt3-module
commit: |
CodSpeed Performance ReportMerging #1566 will degrade performances by 38.47%Comparing 🎉 Hooray!
|
Benchmark | main |
feat/multiple-patch-files |
Change | |
---|---|---|---|---|
👁 | [api-client][createAPIClient] - creating client |
121.2 µs | 196.9 µs | -38.47% |
👁 | [api-client][createAdminAPIClient] - creating client |
153.2 µs | 210 µs | -27.05% |
👁 | [api-client][transformPathToQuery] - transform with body params |
66.6 µs | 97.8 µs | -31.86% |
👁 | [api-client][transformPathToQuery] - transform with header params |
80.7 µs | 92 µs | -12.32% |
⚡ | [api-client][transformPathToQuery] - transform with path params |
387.9 µs | 89.1 µs | ×4.4 |
👁 | [api-client][transformPathToQuery] - transform with path,query,body,header params |
83.1 µs | 120.9 µs | -31.28% |
👁 | [api-client][transformPathToQuery] - transform with query params |
65.8 µs | 97.7 µs | -32.6% |
⚡ | [api-client][transformPathToQuery] - transform without any params |
133.4 µs | 85.2 µs | +56.64% |
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.
Hey, this is what we've been waiting for <3
Only some debug stuff to be removed.
I've found also some unexpected behavior, but I don't think it refers to this PR:
- when there is no ${apiType}Schema.json and I run the
generate
command, the CLI generates identical two files:storeApiSchema.d.ts
andstoreApiTypes.d.ts
(the only difference isShopware API version: unknown
js doc for the last one. - reproduction https://stackblitz.com/edit/71b6o4og?file=api-types%2FstoreApiTypes.d.ts - when there is no ${apiType}Schema.json the CLI doesn't produce any debug info for
generate
command - I guess it's intended and having the file is required to proceed with the debug stuff and the whole merginc logic?
Co-authored-by: Maciek Kucmus <[email protected]>
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.
🥇
@mkucmus thanks for the review!
I'll put this to separate issue (#1591 ), by default it's taking existing schema file but then the version is harder to extract from TS file instead of json, I'll switch to pick json by default
I added additional logs indicating when file is created because of |
Description
closes #1446
Type of change
Adds the possibility of multiple json overrides for schema