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: query-suggestions client APIC-202 #74

Merged
merged 10 commits into from
Jan 12, 2022
Merged

feat: query-suggestions client APIC-202 #74

merged 10 commits into from
Jan 12, 2022

Conversation

millotp
Copy link
Collaborator

@millotp millotp commented Jan 10, 2022

🧭 What and Why

🎟 JIRA Ticket: APIC-202

Create the query-suggestions client

Changes included:

  • Fill the specs
  • Generate the client
  • Rename all qs to query-suggestions because it's not worth it

🧪 Test

CI

@millotp millotp self-assigned this Jan 10, 2022
@millotp millotp requested review from shortcuts and damcou and removed request for shortcuts January 10, 2022 17:35
@millotp millotp marked this pull request as ready for review January 10, 2022 17:36
@millotp millotp requested a review from shortcuts January 10, 2022 17:36
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 good overall!

Some missing descriptions and mostly wondering what we should do with our error status code

tests/generateCTS.ts Show resolved Hide resolved
tests/CTS/templates/javascript.mustache Show resolved Hide resolved
specs/query-suggestions/spec.yml Show resolved Hide resolved
Comment on lines 43 to 48
'401':
$ref: ../../common/responses/Unauthorized.yml
'422':
$ref: ../common/responses/StatusUnprocessableEntity.yml
'500':
$ref: ../../common/responses/InternalError.yml
Copy link
Member

Choose a reason for hiding this comment

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

Are we sure other status are not handled? I believe the engine default status error for all endpoints, but I could be wrong

Copy link
Member

Choose a reason for hiding this comment

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

My guess would be that some errors are documented and some not, we could do some tests to trigger them and see if it's global for all clients

e.g. 403 is declared as MethodNotAllowed on our clients

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I followed the doc but I'm sure some errors are missing, I'll add the common one

Copy link
Member

Choose a reason for hiding this comment

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

In case you added you one, don't hesitate to add them to the common folder too. I wonder if we could have a global schema for all those responses

specs/query-suggestions/common/parameters.yml Outdated Show resolved Hide resolved
specs/query-suggestions/paths/getConfigurationStatus.yml Outdated Show resolved Hide resolved
specs/query-suggestions/common/parameters.yml Outdated Show resolved Hide resolved
Comment on lines +155 to +157
*
* @param getAllConfigs - The getAllConfigs parameters.
*/
Copy link
Member

Choose a reason for hiding this comment

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

Those @param comments are fixed in #77

@millotp millotp requested a review from shortcuts January 12, 2022 10:00
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.

Purfect!

content:
application/json:
schema:
type: array
Copy link
Member

Choose a reason for hiding this comment

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

Does it really return an array directly? :mad:

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm sorry :(

Comment on lines +47 to +48
'422':
$ref: ../../common/responses/StatusUnprocessableEntity.yml
Copy link
Member

Choose a reason for hiding this comment

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

I guess we should add it to all our endpoints 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We should test first, not sure how to trigger this error

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