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

fix: Adjust OpenAPI index POST example request body #3268

Merged
merged 7 commits into from
Dec 9, 2024

Conversation

ChrisBQu
Copy link
Collaborator

Relevant issue(s)

Resolves #2459

Description

On the OpenAPI tool of the playground, the Index POST tab contained an example body that was incorrect. It listed ID as a field which could be set, which was untrue (this value is automatically generated, and trying to pass one in throws an error.) To adjust this, I have created a new description structure called IndexCreateRequestDescription which is meant to be used for this type of HTTP request. To go alongside this change, a new schema type, indexCreateRequestSchema was also created.

Tasks

  • I made sure the code is well commented, particularly hard-to-understand areas.
  • I made sure the repository-held documentation is changed accordingly.
  • I made sure the pull request title adheres to the conventional commit style (the subset used in the project can be found in tools/configs/chglog/config.yml).

How has this been tested?

The platform(s) on which this was tested:

  • Windows

Sorry, something went wrong.

@ChrisBQu ChrisBQu added the invalid This doesn't seem right label Nov 22, 2024
@ChrisBQu ChrisBQu added this to the DefraDB v0.15 milestone Nov 22, 2024
@ChrisBQu ChrisBQu self-assigned this Nov 22, 2024
@ChrisBQu ChrisBQu requested a review from a team November 22, 2024 18:12
Copy link
Member

@nasdf nasdf left a comment

Choose a reason for hiding this comment

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

This does fix the OpenAPI issue, but I think we should also update the client interface.

client/index.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 96.55172% with 1 line in your changes missing coverage. Please review.

Project coverage is 78.14%. Comparing base (edd0ce7) to head (f53b540).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
internal/db/collection_define.go 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3268      +/-   ##
===========================================
+ Coverage    78.09%   78.14%   +0.05%     
===========================================
  Files          382      382              
  Lines        35390    35405      +15     
===========================================
+ Hits         27635    27665      +30     
+ Misses        6119     6109      -10     
+ Partials      1636     1631       -5     
Flag Coverage Δ
all-tests 78.14% <96.55%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cli/index_create.go 86.96% <100.00%> (ø)
client/index.go 80.95% <ø> (ø)
http/client_collection.go 45.45% <ø> (ø)
http/handler_collection.go 72.73% <100.00%> (+0.53%) ⬆️
http/openapi.go 97.52% <ø> (ø)
internal/db/collection_index.go 87.53% <100.00%> (+0.07%) ⬆️
internal/db/collection_define.go 72.24% <83.33%> (+0.58%) ⬆️

... and 17 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update edd0ce7...f53b540. Read the comment docs.

@ChrisBQu ChrisBQu requested a review from nasdf November 29, 2024 17:54
Copy link
Member

@nasdf nasdf left a comment

Choose a reason for hiding this comment

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

Looks really good! Nice work!

@ChrisBQu ChrisBQu merged commit be3f381 into sourcenetwork:develop Dec 9, 2024
42 of 43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenAPI index POST example request body show's ID as a valid field
3 participants