Skip to content

Query flags result in optional args#4

Merged
jwoudenberg merged 1 commit intomasterfrom
query-flags-make-optional-args
Dec 29, 2020
Merged

Query flags result in optional args#4
jwoudenberg merged 1 commit intomasterfrom
query-flags-make-optional-args

Conversation

@jwoudenberg
Copy link
Copy Markdown

Use case: we'd love to add a query flag to an existing endpoint in a backwards compatible manner. This makes it possible by using optional ruby args for query parameters.

When adding a query flag to an existing endpoint it would be nice if
this were a backwards-compatible change. From the HTTP perspective it
already is: the query flag is an optional element of the URI that can be
omitted. But code generation produces a non-optional argument. This
imposes a hard order-of-deploy between the service that supports the new
parameter and the client that makes use of it (or not).

This changes the code so the query flag is an optional argument in ruby
generated code. That way the backwards-compatibility of adding a query
parameter to an API is preserved into our generated code.
@jwoudenberg jwoudenberg merged commit 900dd92 into master Dec 29, 2020
@jwoudenberg jwoudenberg deleted the query-flags-make-optional-args branch December 29, 2020 13:16
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.

1 participant