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): numberOfPendingTasks is plural #1211

Merged
merged 5 commits into from
Jan 4, 2023
Merged

Conversation

kai687
Copy link
Contributor

@kai687 kai687 commented Jan 3, 2023

🧭 What and Why

This PR aims to improve the specs for the listIndicesResponse schema.

Testing the /1/indexes endpoint, I found that numberOfPendingTasks should be plural.

This PR also adds default values for pendingTask (false) and numberOfPendingTasks (0) as both values always seem to be part of the response.

🎟 JIRA Ticket: N/A

Changes included:

  • fix name of response parameter numberOfPendingTasks
  • Add default values for numberOfPendingTasks and pendingTask
  • Make numberOfPendingTasks required for listIndicesResponse
  • Make primary and replicas nullable

🧪 Test

@netlify
Copy link

netlify bot commented Jan 3, 2023

Deploy Preview for api-clients-automation ready!

Name Link
🔨 Latest commit 5af82af
🔍 Latest deploy log https://app.netlify.com/sites/api-clients-automation/deploys/63b45871cb527100093f6703
😎 Deploy Preview https://deploy-preview-1211--api-clients-automation.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@algolia-bot
Copy link
Collaborator

algolia-bot commented Jan 3, 2023

✗ 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.

@kai687 kai687 marked this pull request as ready for review January 3, 2023 08:21
@kai687 kai687 requested a review from a team as a code owner January 3, 2023 08:21
shortcuts
shortcuts previously approved these changes Jan 3, 2023
Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

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

Great catch, thanks!

@shortcuts
Copy link
Member

shortcuts commented Jan 3, 2023

If numberOfPendingTasks is always present in the response, should this be marked as a required property?

Yep indeed

Should primary and replicas be marked as nullable with default values of null if they're optional parameters?

As long as they are not required it should be interpreted correctly by the language, but it might make sense in some cases 🤔

I'd say it's worth adding them and see if it changes something to the generation

shortcuts
shortcuts previously approved these changes Jan 3, 2023
Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

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

looks great!

@shortcuts
Copy link
Member

@kai687 will you try your 2nd question in this PR or can I merge?

@kai687
Copy link
Contributor Author

kai687 commented Jan 3, 2023

@shortcuts sorry, got side-tracked.

@shortcuts
Copy link
Member

@shortcuts sorry, got side-tracked.

no problem!

@kai687
Copy link
Contributor Author

kai687 commented Jan 3, 2023

So, I guess making replicas and primary nullable with null as default values broke the code gen.

@shortcuts
Copy link
Member

So, I guess making replicas and primary nullable with null as default values broke the code gen.

oops D: yep indeed it looks like

@kai687 kai687 requested a review from shortcuts January 4, 2023 13:39
@shortcuts shortcuts merged commit 75c9a86 into main Jan 4, 2023
@shortcuts shortcuts deleted the fix/list-indices-response branch January 4, 2023 13:47
@shortcuts
Copy link
Member

Thanks again!

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.

3 participants