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 support for nested map property names in errors. #2685

Merged
merged 2 commits into from
Jan 15, 2022

Conversation

veleek
Copy link
Contributor

@veleek veleek commented Dec 16, 2021

For the following JSON where the value property is limited to 2048 chars:

{
  "data": {
    "gameType": {
      "value": "Something longer than 2048chars...",
    },
  }
}

Example error before change:

value in body should be at most 2048 chars long.

Example error after change:

data.gameType.value in body should be at most 2048 chars long.

Fixes #2684

@veleek veleek force-pushed the 2684-nestedmapvalidation branch 2 times, most recently from b78d548 to 5042018 Compare December 16, 2021 01:09
Signed-off-by: Ben Randall <veleek@gmail.com>
@veleek
Copy link
Contributor Author

veleek commented Dec 16, 2021

I have no idea why the circleci build is failing... it seems unrelated to this change.

@veleek
Copy link
Contributor Author

veleek commented Dec 16, 2021

FYI @casualjim, this is essentially building on #2684.

@veleek
Copy link
Contributor Author

veleek commented Dec 16, 2021

I believe I forgot to verify the tests last time around. I'll try to take a look at them tomorrow.

@casualjim
Copy link
Member

I fixed the build on master, if you update your base branch the tests should be passing

@codecov
Copy link

codecov bot commented Jan 15, 2022

Codecov Report

Merging #2685 (3e2cb9f) into master (9102404) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2685   +/-   ##
=======================================
  Coverage   82.94%   82.94%           
=======================================
  Files          54       54           
  Lines        9524     9524           
=======================================
  Hits         7900     7900           
  Misses       1112     1112           
  Partials      512      512           

Continue to review full report at Codecov.

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

@casualjim casualjim merged commit 2d026c2 into go-swagger:master Jan 15, 2022
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.

Support nested body params in map objects.
2 participants