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

Added enum custom field names option #1015

Closed
wants to merge 4 commits into from

Conversation

ReallyLiri
Copy link

Useful for non-string enums.
Also added String() impl for such enums.

@Ludonope
Copy link

Precisely what I was looking for, thank you!

Could be interesting to also try to support the OAS 3.1 recommended syntax

MyEnum
  type: integer
  oneOf:
    - title: First
      const: 1
      description: "First value of my enum"
    - title: Second
      const: 2
      description: "Second value of my enum"

Copy link
Member

@tdakkota tdakkota left a comment

Choose a reason for hiding this comment

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

Could you reword commits to follow Conventional Commits, please?

Also, it seems some CI tests failed.

@codecov
Copy link

codecov bot commented Sep 14, 2023

Codecov Report

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

Comparison is base (ae6b3c9) 72.20% compared to head (870d940) 72.22%.
Report is 28 commits behind head on main.

❗ Current head 870d940 differs from pull request most recent head fddcc94. Consider uploading reports for the commit fddcc94 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1015      +/-   ##
==========================================
+ Coverage   72.20%   72.22%   +0.02%     
==========================================
  Files         192      192              
  Lines       15027    15040      +13     
==========================================
+ Hits        10850    10863      +13     
- Misses       3641     3642       +1     
+ Partials      536      535       -1     
Files Coverage Δ
jsonschema/schema.go 100.00% <ø> (ø)
gen/schema_gen_primitive.go 91.32% <90.90%> (+0.95%) ⬆️
jsonschema/parser.go 82.15% <25.00%> (-0.48%) ⬇️

... and 1 file with indirect coverage changes

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

@ReallyLiri
Copy link
Author

Unfortunately I don't have the time to invest in getting this PR "to code", if anyone wants to pick it up, please do.

@ReallyLiri ReallyLiri closed this Sep 28, 2023
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.

3 participants