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

fix(specs): rules and objects parameters/responses #876

Merged
merged 6 commits into from
Jul 28, 2022

Conversation

shortcuts
Copy link
Member

@shortcuts shortcuts commented Jul 28, 2022

🧭 What and Why

🎟 JIRA Ticket:

Changes included:

Some more specs fixes found during the Crawler implementation.

  • make getObjects generic as it was in v4
  • distinct should accept boolean as some other parameter of the same shape
  • more parameter naming similar to v4
  • js generics:
    • use partials for some redundant case, which also helps with readability
    • add default to Record<string, any>

🧪 Test

CI :D

@shortcuts shortcuts self-assigned this Jul 28, 2022
@netlify
Copy link

netlify bot commented Jul 28, 2022

Deploy Preview for api-clients-automation canceled.

Name Link
🔨 Latest commit 5499dae
🔍 Latest deploy log https://app.netlify.com/sites/api-clients-automation/deploys/62e28461c7148d0007fc293a

@algolia-bot
Copy link
Collaborator

algolia-bot commented Jul 28, 2022

✗ The generated branch has been deleted.

If the PR has been merged, you can check the generated code on the main branch.
You can still access the code generated on main via this commit.

@shortcuts shortcuts force-pushed the fix/specs-responses-and-parameters branch from c4d66cf to 8d7966f Compare July 28, 2022 10:15
@shortcuts shortcuts changed the title fix(specs): rules and objects parameters fix(specs): rules and objects parameters/responses Jul 28, 2022
Copy link
Contributor

@bodinsamuel bodinsamuel left a comment

Choose a reason for hiding this comment

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

At this point of customisation I wonder if we could have chose a different strategy.
E.g: keep the generation simple and wrap with custom code where we would inherit the simple generation and override the methods when needed.

@shortcuts
Copy link
Member Author

At this point of customisation I wonder if we could have chose a different strategy. E.g: keep the generation simple and wrap with custom code where we would inherit the simple generation and override the methods when needed.

Do you mean for the generic part? I admit that it's a bit cumbersome in some parts.

Also, it seems that openapi-generator supports handlebars, which could reduce the logic of those cases

@shortcuts
Copy link
Member Author

we would inherit the simple generation and override the methods when needed.

I think wrapping would have a size impact also :/ which is not ideal for js

@shortcuts shortcuts merged commit 95ba001 into main Jul 28, 2022
@shortcuts shortcuts deleted the fix/specs-responses-and-parameters branch July 28, 2022 13:07
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.

None yet

3 participants