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

kumuluzee-openapi-mp-maven-plugin #196

Open
eriskooo opened this issue Feb 24, 2021 · 2 comments
Open

kumuluzee-openapi-mp-maven-plugin #196

eriskooo opened this issue Feb 24, 2021 · 2 comments

Comments

@eriskooo
Copy link

eriskooo commented Feb 24, 2021

Hello,

I am unable to succesfully generate openapi definition via maven build, generated files json+yaml does not contains any definitions

{
"openapi" : "3",
"info" : {
"title" : "Generated API",
"version" : "1.0"
},
"paths" : { }
}

=======================
my pom.xml

    <dependency>
        <groupId>com.kumuluz.ee.openapi</groupId>
        <artifactId>kumuluzee-openapi-mp-ui</artifactId>
        <version>1.1.2</version>
    </dependency>

    <dependency>
        <groupId>io.swagger.core.v3</groupId>
        <artifactId>swagger-annotations</artifactId>
        <version>2.1.1</version>
    </dependency>

    <plugin>
            <artifactId>kumuluzee-openapi-mp-maven-plugin</artifactId>
            <groupId>com.kumuluz.ee.openapi</groupId>
            <version>1.4.0</version>
            <configuration>
                <outputDirectory>${basedir}/swagger-generated/</outputDirectory>
                <schemaFilename>swagger</schemaFilename>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

could you plz help me why maven plugin is unable to find any controller ?

@osbeorn
Copy link
Member

osbeorn commented Mar 4, 2021

Could you please provide the structure of your project or better yet, a link to the repo, so I can take closer look.

@eriskooo
Copy link
Author

eriskooo commented Mar 4, 2021

Hi,

it seems, that problem is related to swagger,
I've generated something like this and even https://editor.swagger.io/ cannot render fields properly

...
requestDate:
format: date-time
description: chargeback request date in UTC
type: string

object which contains this date field has an example used not at field, but as custom object

@APIResponses(value = {
        @APIResponse(responseCode = "200", description = "OK",
				content = @Content(schema = @Schema(implementation = ChargebackDetailResponse.class,
						example = CHARGES_FOR_TRIP_ID))),

CHARGES_FOR_TRIP_ID contains String with json -> if I put invisible char (\u0007) into date field, it is rendered properly

("requestDate": "2021-02-28T20:19:19.77\u0007",\n")

ZonedDateTime is rendered perfectly, Instant and LocalDateTime has an issue.

Many thanks for any help

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

No branches or pull requests

2 participants