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

Sync OpenAPI; Multiple parameter correctness changes #206

Merged
merged 1 commit into from
Jul 25, 2023
Merged

Sync OpenAPI; Multiple parameter correctness changes #206

merged 1 commit into from
Jul 25, 2023

Conversation

maxb
Copy link
Contributor

@maxb maxb commented Jul 25, 2023

This includes the results of:

The general direction of change is pretty positive, but in reviewing the
generated diffs, I have spotted an issue: we are now generating correct
parameters for query parameters... but those query parameters are being
handled as individual function parameters... which are generated in the
order listed in the OpenAPI spec... which is dependent on random Go hash
iteration ordering. Ugh.

Oh well, let's catch up with latest developments in the Vault repo for
now, and I'll go put in a new PR to at least sort the parameters
alphabetically.

Longer term, this is probably going to push us in the direction of
excluding the GET version of APIs with equivalent GET and POST versions
from the generated libraries.

This includes the results of:
* hashicorp/vault#21949
* hashicorp/vault#21942
* hashicorp/vault#22027

The general direction of change is pretty positive, but in reviewing the
generated diffs, I have spotted an issue: we are now generating correct
parameters for query parameters... but those query parameters are being
handled as individual function parameters... which are generated in the
order listed in the OpenAPI spec... which is dependent on random Go hash
iteration ordering. Ugh.

Oh well, let's catch up with latest developments in the Vault repo for
now, and I'll go put in a new PR to at least sort the parameters
alphabetically.

Longer term, this is probably going to push us in the direction of
excluding the GET version of APIs with equivalent GET and POST versions
from the generated libraries.
@maxb maxb requested a review from a team July 25, 2023 04:12
@averche
Copy link
Collaborator

averche commented Jul 25, 2023

Longer term, this is probably going to push us in the direction of
excluding the GET version of APIs with equivalent GET and POST versions
from the generated libraries.

We can definitely do that. As a library user, I would rather want just the a single "recommended" method exposed to me rather than having to guess which one to use.

@averche averche merged commit 74e907d into hashicorp:main Jul 25, 2023
@maxb maxb deleted the sync-openapi branch July 25, 2023 15:39
@averche averche mentioned this pull request Sep 18, 2023
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