Skip to content

fix: use object for CTS parameters #61

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

Merged
merged 4 commits into from
Jan 6, 2022
Merged

fix: use object for CTS parameters #61

merged 4 commits into from
Jan 6, 2022

Conversation

millotp
Copy link
Collaborator

@millotp millotp commented Jan 5, 2022

🧭 What and Why

Use object for every parameters in the CTS, to accommodate language like javascript where you need to pass the parameters name too.

Also create a parameter array for other languages.

The test are now ordered alphabetically, because on some machines the file order was messed up and generating a different output.

Changes included:

  • Change params from array to object with parameters name as key
  • Create parameters array as substitute
  • Order tests

🧪 Test

  • yarn docker cts:generate
  • yarn docker cts:test

@millotp millotp requested review from damcou and shortcuts January 5, 2022 13:35
@millotp millotp self-assigned this Jan 5, 2022
@millotp millotp force-pushed the fix/cts-param-array branch 2 times, most recently from 5ee34a5 to 564069f Compare January 6, 2022 09:15
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.

Small comment, I think we should add the API ref in this PR otherwise we will start forgetting things

@millotp millotp force-pushed the fix/cts-param-array branch from 564069f to 15c2811 Compare January 6, 2022 12:34
@millotp millotp requested a review from shortcuts January 6, 2022 12:37
shortcuts
shortcuts previously approved these changes Jan 6, 2022
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.

NICE!! GG

doc/CTS.md Outdated
"method": "the method to call on the API Client",
"parameters": {
// Object of all parameters with their name, tobe used for languages that require the parameter name
"parameter name": "value",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"parameter name": "value",
"parameterName": "value",

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