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

Cannot find symbol "NOT_FOUND.class" #852

Open
david-cabillic opened this issue Nov 13, 2024 · 4 comments · May be fixed by #864
Open

Cannot find symbol "NOT_FOUND.class" #852

david-cabillic opened this issue Nov 13, 2024 · 4 comments · May be fixed by #864
Assignees
Labels
area:client This item is related to the client extension bug Something isn't working

Comments

@david-cabillic
Copy link

david-cabillic commented Nov 13, 2024

During generation with 2.6.0-lts (or 2.5.0) from an Open API JSON file, a NOT_FOUND.class is included in annotations but not imported :

@com.fasterxml.jackson.annotation.JsonSubTypes({
    @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = NOT_FOUND.class, name = "ArchivalAutoFillExpansion"),
    @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = NOT_FOUND.class, name = "ReindexAutoFillExpansion"),
    @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = NOT_FOUND.class, name = "ArchivalAutoFillExpansionModifierProperties"),
    @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = NOT_FOUND.class, name = "ReindexAutoFillExpansionModifierProperties"),
})

It was working with 2.4.7.

@ricardozanini
Copy link
Member

Hi! Thanks for reporting it, but we will need more info.

Can you please share a reproducer?

@ricardozanini ricardozanini added area:client This item is related to the client extension bug Something isn't working labels Nov 13, 2024
@david-cabillic
Copy link
Author

david-cabillic commented Nov 18, 2024

Hi,

It's not easy to provide a reproducer cause I have few time and my code is in a custom company framework. This is my config :

pom.xml

<properties>
        <quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
        <quarkus.platform.version>3.16.2</quarkus.platform.version>
        <quarkus-maven-plugin.version>3.16.2</quarkus-maven-plugin.version>
</properties>
<dependencies>
        <dependency>
            <groupId>io.quarkiverse.openapi.generator</groupId>
            <artifactId>quarkus-openapi-generator</artifactId>
            <version>2.6.0-lts</version>
        </dependency>
</dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>io.smallrye</groupId>
                <artifactId>jandex-maven-plugin</artifactId>
                <version>3.1.6</version>
                <executions>
                    <execution>
                        <id>make-index</id>
                        <goals>
                            <goal>jandex</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-maven-plugin</artifactId>
                <version>${quarkus.platform.version}</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <goals>
                            <goal>build</goal>
                            <goal>generate-code</goal>
                            <goal>generate-code-tests</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

src/main/resources/application.properties

quarkus.openapi-generator.codegen.enable-security-generation=false
quarkus.openapi-generator.codegen.spec.administration_json.base-package=ch.tcs.onbase.administration
quarkus.openapi-generator.codegen.spec.administration_json.config-key=obadministration
quarkus.openapi-generator.codegen.spec.administration_json.additional-api-type-annotations=@org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders(ch.tcs.onbase.header.AuthHeadersFactory.class)
quarkus.openapi-generator.codegen.spec.administration_json.model-name-prefix=OB

src/main/openapi/administration.json

@ricardozanini
Copy link
Member

ricardozanini commented Nov 18, 2024

@david-cabillic can't you share the OpenAPI file?

EDIT: sorry, I see that you uploaded in the link. I'll take a look.

@ricardozanini ricardozanini self-assigned this Nov 18, 2024
@david-cabillic
Copy link
Author

@ricardozanini Maybe you should activate security and remove 'quarkus.openapi-generator.codegen.spec.administration_json.additional-api-type-annotations'.

ricardozanini added a commit to ricardozanini/quarkus-openapi-generator that referenced this issue Nov 21, 2024
@ricardozanini ricardozanini linked a pull request Nov 21, 2024 that will close this issue
7 tasks
ricardozanini added a commit to ricardozanini/quarkus-openapi-generator that referenced this issue Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:client This item is related to the client extension bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants