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
[Fleet] Add elastic-api-version support #2677
Conversation
DefaultVersion = "2023-06-01" | ||
) | ||
|
||
var SupportedVersions = []string{DefaultVersion} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering if there is a better place to list the versions we support and the default version.
b307864
to
d2a9ba4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think it looks good, mostly have nitpicks.
We may want to consider altering the openapi spec to show responses will contain the version header (we don't do this for request ids, but we should)
The only real concern I have is now we're changing the behaviour of the status endpoint as well
Co-authored-by: Michel Laterman <82832767+michel-laterman@users.noreply.github.com>
in my opinion is probably okay as if you do not provide the |
This pull request is now in conflicts. Could you fix it @nchaulet? 🙏
|
… into feature-api-version
Description
Introduce a new middleware that support
elastic-apiversion
header to allow versioning of the Fleet server APIs.If the header is not provided we fallback to a default version.
For PR readability I will add some integration tests that duplicate the client and the api tests suite in a following PR.
Todo