cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. Fiala (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CXF-6965) CXF Swagger2Feature does not correctly support QueryParam("") and DataHandler
Date Sun, 10 Jul 2016 19:32:11 GMT

    [ https://issues.apache.org/jira/browse/CXF-6965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15369903#comment-15369903
] 

J. Fiala edited comment on CXF-6965 at 7/10/16 7:31 PM:
--------------------------------------------------------

Thank you for the quick response! OK, so we have to extract all the swagger-jaxrs-related
into a a swagger-jaxrs-issue. 

h2. wadl2java - cxf-tools-wadlto-jaxrs  issues
h3. SourceGenerator does not support BeanValidation for request/response structures

BeanValidation support for request/response structures has been added in this extension to
the cxf-wadl2java-plugin:
https://github.com/jfiala/krasa-jaxb-tools
It would be nice if this can somehow find its way into the cxf modules...

h3. SourceGenerator does not support BeanValidation for query parameters
And neither does the extension above support the query parameters.

I added the support of @NotNull to SourceGenerator.java to start with.
However, to add @Size/@Min/@Max/@Pattern I need to read the simplytypes and their restrictions.
Currently there seems to be no efficient way already implemented in cxf-tools-wadlto-jaxrs,
it only deals with the "type" as string-value, but not with the org.w3c.dom.Element backing
it. Do you have this somewhere else in the codebase?
Does it make sense to scan my own Map of org.w3c.dom.Elements of simpleTypes to resolve their
restrictions?

h3. SourceGenerator does not allow (easy) source code customization
Currently its relatively hard to customize the generated java sources.

Swagger-Codegen has based the complete code/file generation only on Mustache files, which
makes it really easy to extend/customize the output, maybe this would make sense here as well.
If the whole Schema-structure is first parsed and made available as Mustache, the whole code
generation would be a lot easier to work with.



was (Author: jfx):
Thank you for the quick response! OK, so we have to extract all the swagger-jaxrs-related
into a a swagger-jaxrs-issue. 

h2. wadl2java - cxf-tools-wadlto-jaxrs  issues
h3. SourceGenerator does not support BeanValidation

a) BeanValidation support for request/response structures has been added in this extension
to the cxf-wadl2java-plugin:
https://github.com/jfiala/krasa-jaxb-tools
It would be nice if this can somehow find its way into the cxf modules...

b) However, the extension above does not support the query parameters.

I added the support of @NotNull to SourceGenerator.java to start with.
However, to add @Size/@Min/@Max/@Pattern I need to read the simplytypes and their restrictions.
Currently there seems to be no efficient way already implemented in cxf-tools-wadlto-jaxrs,
it only deals with the "type" as string-value, but not with the org.w3c.dom.Element backing
it. Do you have this somewhere else in the codebase?
Does it make sense to scan my own Map of org.w3c.dom.Elements of simpleTypes to resolve their
restrictions?

h3. SourceGenerator does not allow (easy) source code customization
Currently its relatively hard to customize the generated java sources.

Swagger-Codegen has based the complete code/file generation only on Mustache files, which
makes it really easy to extend/customize the output, maybe this would make sense here as well.
If the whole Schema-structure is first parsed and made available as Mustache, the whole code
generation would be a lot easier to work with.


> CXF Swagger2Feature does not correctly support QueryParam("") and DataHandler
> -----------------------------------------------------------------------------
>
>                 Key: CXF-6965
>                 URL: https://issues.apache.org/jira/browse/CXF-6965
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>            Reporter: Sergey Beryozkin
>            Priority: Minor
>             Fix For: 3.2.0, 3.1.8
>
>
> See https://github.com/swagger-api/swagger-codegen/issues/2017#issuecomment-230426728



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message