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 support deprecated extension for enum values. #1781

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

altro3
Copy link
Collaborator

@altro3 altro3 commented Sep 21, 2024

Added support primitive types in enum values
Fixes for numeric type generating.

See: OpenAPITools/openapi-generator#19615

Also added supprot custom types / formats for java primitives:

Primitive type char:

schema:
  type: char

Primitive type byte:

schema:
  type: byte

Object type Byte:

schema:
  type: integer
  format: int8 # or byte

Primitive type short:

schema:
  type: short

Object type Short:

schema:
  type: integer
  format: int16 # or short

Also you can set this custom type / format by extension:

Object type Short:

schema:
  type: integer
  x-format: int16 # or short

Primitive type short:

schema:
  type: integer
  x-type: short

@altro3 altro3 force-pushed the fix-enum-generating branch 7 times, most recently from b96c520 to fad4086 Compare September 27, 2024 07:36
@@ -37,7 +37,7 @@ protected String generateFiles(MicronautCodeGenerator<?> codegen, String configP
} catch (IOException e) {
fail("Unable to create temporary directory for output");
}
output.deleteOnExit();
// output.deleteOnExit();
Copy link
Contributor

Choose a reason for hiding this comment

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

why?

Copy link
Collaborator Author

@altro3 altro3 Sep 30, 2024

Choose a reason for hiding this comment

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

just mistake. I comment it, when I test it locally. Need to see, what were generated. Sometimes I forgot uncomment it. Fixed

Added support primitive types in enum values
Fixes for numeric type generating.
@altro3 altro3 changed the base branch from 6.12.x to 6.13.x September 30, 2024 14:09
@graemerocher graemerocher merged commit 59192d9 into micronaut-projects:6.13.x Oct 3, 2024
6 checks passed
@graemerocher graemerocher added the type: enhancement New feature or request label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants