Skip to content

Add ability to disable only annotation processing but enable generate and copy view resources.#1344

Merged
sdelamo merged 1 commit into
micronaut-projects:masterfrom
altro3:add-ability-to-disable-only-openapispec-file
Dec 8, 2023
Merged

Add ability to disable only annotation processing but enable generate and copy view resources.#1344
sdelamo merged 1 commit into
micronaut-projects:masterfrom
altro3:add-ability-to-disable-only-openapispec-file

Conversation

@altro3

@altro3 altro3 commented Dec 6, 2023

Copy link
Copy Markdown
Collaborator

Fixed #1341

@altro3 altro3 requested a review from melix December 6, 2023 10:59
@altro3

altro3 commented Dec 6, 2023

Copy link
Copy Markdown
Collaborator Author

@melix Added new property micronaut.openapi.swagger.file.generation.enabled to disable generation only spec file

@melix melix left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick turnaround! It seems that there are unrelated changes in this PR, mostly refactorings, but I'm fine with it, just made the review a bit more complicated :)

Comment thread src/main/docs/guide/configuration/availableOptions.adoc Outdated
Comment thread openapi/src/test/groovy/io/micronaut/openapi/view/OpenApiViewSpec.groovy Outdated
return value;
}

public static boolean isGenerationSpecEnabled(VisitorContext context) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method name reads a bit strange. Suggestion: isSpecGenerationEnabled

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@altro3 altro3 force-pushed the add-ability-to-disable-only-openapispec-file branch from 545108a to 072ff42 Compare December 6, 2023 12:35
@altro3

altro3 commented Dec 6, 2023

Copy link
Copy Markdown
Collaborator Author

Thanks for the quick turnaround! It seems that there are unrelated changes in this PR, mostly refactorings, but I'm fine with it, just made the review a bit more complicated :)

This Is not refactoriring. Just It was necessary to finally get rid of the problem of an empty context for tests. Those. Now all operations with the context are Null-Safe

@melix

melix commented Dec 6, 2023

Copy link
Copy Markdown
Contributor

Looks like there's a compilation error after the latest changes.

@altro3 altro3 force-pushed the add-ability-to-disable-only-openapispec-file branch from 072ff42 to f7cb930 Compare December 6, 2023 14:50
@altro3

altro3 commented Dec 6, 2023

Copy link
Copy Markdown
Collaborator Author

Disable KSP test, before micronaut-projects/micronaut-core#10228 and micronaut-projects/micronaut-core#10227 not fixed

@altro3

altro3 commented Dec 6, 2023

Copy link
Copy Markdown
Collaborator Author

@melix found problems with KSP

@altro3 altro3 requested a review from sdelamo December 7, 2023 10:02
@sdelamo sdelamo merged commit adc7d7c into micronaut-projects:master Dec 8, 2023
@lucjross-favor

Copy link
Copy Markdown

This is nice, thank you all!

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

Successfully merging this pull request may close these issues.

Have spec file generation disabled when using server generation from spec file

4 participants