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

feat(java): CTS APIC-253 #102

Merged
merged 29 commits into from
Feb 9, 2022
Merged

feat(java): CTS APIC-253 #102

merged 29 commits into from
Feb 9, 2022

Conversation

millotp
Copy link
Collaborator

@millotp millotp commented Jan 21, 2022

🧭 What and Why

🎟 JIRA Ticket: APIC-253

Generate the CTS for Java, using the parameters with data type to generate all objects recursively. The naming is kind of ugly but the tests are functional.

Also test searchParams.

Changes included:

  • Add $objectName and $enumType to search cts
  • Add JSONAssert to check if the body contains the same set of properties as the CTS (it will also contains all the default, that we still need to check)

🧪 Test

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

@millotp millotp self-assigned this Jan 21, 2022
@millotp millotp changed the base branch from main to fix/consistant-script January 21, 2022 17:16
Base automatically changed from fix/consistant-script to main January 24, 2022 10:39
@millotp millotp changed the base branch from main to fix/split-enum January 25, 2022 17:09
Base automatically changed from fix/split-enum to main January 26, 2022 10:12
@millotp millotp marked this pull request as ready for review January 26, 2022 10:44
@millotp millotp requested review from a team and eunjae-lee and removed request for a team January 26, 2022 10:44
@millotp millotp marked this pull request as draft January 26, 2022 13:28
@@ -2,7 +2,11 @@
{
"method": "addApiKey",
"parameters": {
"acl": ["search", "addObject"],
"$objectName": "ApiKey",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you put a short section in our README or wherever about $objectName, and some other $... stuff?
I guess it's used in generating java client, but for languages like JavaScript will not use it, and people like me will have trouble writing this json spec in the future if the information isn't there.
Anyway it's not necessarily relevant to this PR. So it's not blocking.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's a bit documented in CTS.md but not $enumType, I'll add it.
The enum is present in the spec so it's 1:1 between the test and the spec, nothing particular for js or java.

eunjae-lee
eunjae-lee previously approved these changes Jan 26, 2022
@eunjae-lee eunjae-lee self-requested a review January 26, 2022 14:20
@eunjae-lee
Copy link
Contributor

I just saw you marked it as draft. So dismissing my approval for now.

Is there more to do?

@millotp
Copy link
Collaborator Author

millotp commented Jan 26, 2022

Yes I have a issue with maven not running tests on the CI:
Error creating properties files for forking

I can't find info about this error and can't reproduce locally, it might be because of limited storage on the CI or something more complicated.

I'm investigating it but I feel like I'm loosing a lot of time with maven for development so I'm considering switching to gradle before it's too late, so this PR is postponed.

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