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 misuse of omitempty in jsonschema #1136

Merged
merged 6 commits into from
Nov 15, 2023
Merged

Conversation

xxx7xxxx
Copy link
Contributor

Try to fix the massive misuse of omitempty in #884 . Now the fields without specifying omitempty would be required by default.

As for the required misuse, I don't think there is a simple and brute solution like emitempty. Since required needs to change the type to its pointer type, which would cause a lot of huge changes. Another way is to change the vendor to do it, which will bring more complexity. I suggest letting it be and changing it in the next development step by step.

@xxx7xxxx xxx7xxxx changed the title V @xxx7xxxx Fix misuse of omitempty in jsonschema Nov 13, 2023
@xxx7xxxx xxx7xxxx changed the title @xxx7xxxx Fix misuse of omitempty in jsonschema Fix misuse of omitempty in jsonschema Nov 13, 2023
suchen-sci
suchen-sci previously approved these changes Nov 15, 2023
pkg/object/httpserver/spec.go Outdated Show resolved Hide resolved
pkg/object/nacosserviceregistry/nacosserviceregistry.go Outdated Show resolved Hide resolved
@suchen-sci
Copy link
Contributor

suchen-sci commented Nov 15, 2023

@xxx7xxxx looks good to me, just two little typo.

@codecov-commenter
Copy link

codecov-commenter commented Nov 15, 2023

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (4a57baf) 81.23% compared to head (ade9ffa) 81.23%.

Files Patch % Lines
pkg/v/v.go 55.55% 3 Missing and 1 partial ⚠️
pkg/v/validaterecorder.go 72.72% 1 Missing and 2 partials ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1136      +/-   ##
==========================================
- Coverage   81.23%   81.23%   -0.01%     
==========================================
  Files         148      148              
  Lines       16623    16618       -5     
==========================================
- Hits        13504    13499       -5     
+ Misses       2480     2479       -1     
- Partials      639      640       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xxx7xxxx xxx7xxxx added this pull request to the merge queue Nov 15, 2023
Merged via the queue into easegress-io:main with commit e0cfeaf Nov 15, 2023
8 checks passed
@xxx7xxxx xxx7xxxx deleted the v branch November 20, 2023 03:11
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.

None yet

3 participants