Skip to content

[JaxRsCXFServer] Minor improvements BeanValidation/Unittests/Jboss/JAXB #4088

@jfiala

Description

@jfiala
Description
Language CXF server
  • add CLI-flag for @Consumes/@produces annotations for JSON (default: true)
  • add CLI-flag for switching between Spring XML or annotation-config
  • add CLI-flag for switching JAXB annotations in the model classes on/off
  • add CLI-flag and JbossFeature to only generate jboss-specific files if requested
    (jboss-web.xml)
  • add CLI-flag useSwaggerUI to activate Swagger UI automatically
  • add basePath /services/services to ApplicationContext.xml to allow immediate usage of the generated contract
  • update to CXF 3.1.8 and add new flag supportSwaggerUi to ApplicationContext.xml
  • changed default path for Spring Boot to / for access using http://localhost:8080/
  • cleanup Jaxrs annotations from apiServiceImpl.mustache/parameter mustache templates
  • fix handling of Multiparts to org.apache.cxf.jaxrs.ext.multipart.Attachment
  • generate .swagger-codegen-ignore file to protect generated impl-code
Language CXF client
  • add CLI-flag for switching JAXB annotations in the model classes on/off
Language jaxrs-resteasy:
  • add CLI flag for Jboss to language jaxrs-resteasy (with default true to be non-breaking)
  • added new test for CLI options JavaResteasyServerOptionsTest
Further features
  • improve CXF QueryParam BeanValidation formatting
    currently reused from beanValidation.mustache, but will add a newline after each beanvalidation annotation.
    @wing328: Does it make sense to setup a separate mustache files just to get nicer formatting?
  • add separate CLI-flags for controlling junit test features
    (e.g. gzip/logging/... support)
    The gzip/logging code lines are currently generated automatically for server + junit-tests if switched on, but I think it would be better to have separate flags for the unittests.
Further features Part 2
  • check for void in apiServiceImpl to suppress the return statement (instead of returnType, which is void for no returnType...)

added all above features to branch cxf_refine.

This requires a variable for the void type in the Generator!

Related issues
  • add CLI-flag to generate jboss-deployment-structure for JEE 6 servers and CXF 3 support

IMHO currently not necessary

PR #4164
Former PR #4003, #4147 (closed as changes haven't been picked up)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions