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

Add header with API version #291

Merged
merged 7 commits into from
Jun 11, 2023
Merged

Conversation

renghen
Copy link
Contributor

@renghen renghen commented Jun 6, 2023

Closes #249

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • CHANGELOG.md have been updated (for bug fixes / features / docs)

What kind of change does this PR introduce?

Feature

What is the current behavior?

See #249

What is the new behavior?

The 'x-reduct-api' header is added with the API version for each response

Does this PR introduce a breaking change?

No

Other information:

Copy link
Member

@atimin atimin left a comment

Choose a reason for hiding this comment

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

@rengehn , thanks for your contribution! See my comment about the implementation.

Don't forget, please, to add a record into CHANGELOG.md and a test into api_tests/http_test.py.

P.S. And fill please the PR template, so that we could keep the context. Thanks!

src/main.rs Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
@atimin atimin changed the title header added for version Add header with API version Jun 10, 2023
@atimin
Copy link
Member

atimin commented Jun 10, 2023

@renghen , the code looks good for me. I resolved conflicts with the main branch and ready to merge, but the linter fails. Could you make the checks green? Use cargo fmt to fix the format automatically. Thanks!

@atimin atimin merged commit ef28e3c into reductstore:main Jun 11, 2023
11 of 12 checks passed
@atimin
Copy link
Member

atimin commented Jun 11, 2023

Just figured out that I need it urgently. I've taken it with the broken CI but I'll fix it in the main branch.

@renghen
Copy link
Contributor Author

renghen commented Jun 11, 2023

I did a cargo fmt before any push, I need to check what goes wrong on that one

@renghen
Copy link
Contributor Author

renghen commented Jun 11, 2023

I got it, I should use
cargo fmt --all for it to be ok.
cargo fmt is not enough
I did not know that.

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.

Feature: HTTP API version in headers
2 participants