2.3.0 • Published 3 months ago

@openapi-generator-plus/java-jaxrs-server-generator v2.3.0

Weekly downloads
41
License
Apache-2.0
Repository
github
Last release
3 months ago

Java JAX-RS Server API generator for OpenAPI Generator Plus

An OpenAPI Generator Plus template for a Java API server using JAX-RS.

Overview

The generated code has useful features:

  • Exceptions are used for non-default responses, such as 400 responses, so you can only return the specified status codes.
  • Response Exceptions can have an entity type to return with the error response.
  • Model objects and enums will be nested in the API service if they are inlined in the specification.

Using

See the OpenAPI Generator Plus documentation for how to use generator templates.

Config file

The available config file properties are:

Project layout

PropertyTypeDescriptionDefault
packagestringBase package name that other default package names will be based on."com.example"
apiPackagestringPackage for API interfaces."${package}"
apiImplPackagestringPackage for API implementation classes."${apiPackage}.impl"
apiServicePackagestringPackage for API service interfaces."${apiPackage}.service"
apiServiceImplPackagestringPackage for API service implementation classes."${apiServicePackage}.impl"
modelPackagestringPackage for API model classes."${package}.model"
invokerPackagestring | nullPackage for API invoker classes."${package}.app"
validationPackagestringPackage for API validation classes."${package}.validation"
relativeSourceOutputPathstringThe path to output generated source code, relative to the output path../ or ./src/main/java if maven is specified.

Code style

PropertyTypeDescriptionDefault
useBeanValidationbooleanWhether to use bean validation.true
dateImplementationstringDate type class."java.time.LocalDate"
timeImplementationstringTime type class."java.time.LocalTime"
dateTimeImplementationstringDate time type class."java.time.OffsetDateTime"
binaryRepresentationstringBinary data representation."byte[]"
constantStyle"allCapsSnake" | "allCaps" | "camelCase" | "pascalCase"The style to use for constant naming."allCapsSnake"
apiClassPrefixstringApply a prefix to all API interface and implementation class names.undefined
modelClassPrefixstringApply a prefix to all model class names.undefined
authenticationRequiredAnnotationstringAnnotation to add to API methods that require authentication.undefined
useJakartabooleanWhether to use jakarta packages instead of javax packages.false

Packaging

PropertyTypeDescriptionDefault
mavenMavenConfigConfiguration for generating a Maven pom.xmlundefined

MavenConfig

PropertyTypeDescriptionDefault
groupIdstringThe Maven template groupIdcom.example
artifactIdstringThe Maven template artifactIdapi-server
versionstringThe Maven template version0.0.1
versions{ name: version }Custom dependency versions (see pom.hbs)undefined

General

PropertyTypeDescriptionDefault
hideGenerationTimestampbooleanWhether to hide the timestamp in the @Generated annotation.false

Testing

PropertyTypeDescriptionDefault
includeTestsbooleanWhether to generate test classes.false
junitVersion4 | 5The JUnit version to use.5

Overrides

PropertyTypeDescriptionDefault
importsstring[]Additional imports to add to all generated classes.undefined
customTemplatesstringThe path to a directory containing custom Handlebars templates, relative to the config file. See Customising below.undefined

Customising

This generator supports a customTemplates config file property to specify a directory containing Handlebars templates that will be used to override built-in templates.

Any custom template will have the original template available as a partial named by prefixing the template name with original, and then upper-casing the first letter, e.g. originalBodyParams.

Some of the templates in the generator are designed to support overriding for custom requirements. Please inspect the templates in the templates directory.

2.3.0

3 months ago

2.2.11

5 months ago

2.2.5

8 months ago

2.2.4

10 months ago

2.2.7

6 months ago

2.2.6

8 months ago

2.2.10

6 months ago

2.2.9

6 months ago

2.2.8

6 months ago

2.2.3

1 year ago

2.2.2

1 year ago

2.2.1

1 year ago

2.2.0

1 year ago

2.1.2

2 years ago

2.1.4

2 years ago

2.1.3

2 years ago

2.0.0

2 years ago

1.1.1

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

1.0.2

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.37.9

2 years ago

0.37.8

2 years ago

0.37.7

3 years ago

0.37.6

3 years ago

0.37.2

3 years ago

0.37.5

3 years ago

0.36.0

3 years ago

0.37.1

3 years ago

0.37.0

3 years ago

0.35.2

3 years ago

0.35.1

3 years ago

0.34.0

3 years ago

0.35.0

3 years ago

0.33.3

3 years ago

0.33.2

3 years ago

0.32.0

3 years ago

0.33.1

3 years ago

0.33.0

3 years ago

0.31.1

3 years ago

0.31.0

3 years ago

0.30.1

3 years ago

0.30.0

3 years ago

0.29.0

3 years ago

0.28.0

3 years ago

0.27.1

3 years ago

0.27.0

3 years ago

0.25.0

3 years ago

0.23.2

3 years ago

0.21.4

3 years ago

0.23.1

3 years ago

0.23.0

3 years ago

0.26.0

3 years ago

0.24.2

3 years ago

0.24.1

3 years ago

0.24.0

3 years ago

0.22.0

3 years ago

0.21.3

3 years ago

0.21.2

3 years ago

0.20.0

3 years ago

0.21.1

3 years ago

0.21.0

3 years ago

0.19.0

3 years ago

0.17.0

3 years ago

0.16.0

3 years ago

0.16.1

3 years ago

0.18.0

3 years ago

0.15.2

3 years ago

0.15.0

3 years ago

0.15.1

3 years ago

0.14.1

3 years ago

0.14.0

3 years ago

0.13.4

3 years ago

0.13.3

3 years ago

0.13.2

3 years ago

0.13.1

3 years ago

0.13.0

3 years ago

0.12.0

3 years ago

0.11.0

3 years ago

0.10.1

3 years ago

0.10.0

3 years ago

0.9.1

4 years ago

0.9.0

4 years ago

0.8.5

4 years ago

0.8.4

4 years ago

0.8.3

4 years ago

0.8.2

4 years ago

0.8.1

4 years ago

0.8.0

4 years ago

0.7.1

4 years ago

0.7.0

4 years ago

0.6.5

4 years ago

0.6.3

4 years ago

0.6.4

4 years ago

0.6.2

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.6

4 years ago

0.5.5

4 years ago

0.5.4

4 years ago

0.5.3

4 years ago

0.5.2

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago