-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Mill Module #22652
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
base: master
Are you sure you want to change the base?
Mill Module #22652
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8 issues found across 18 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="modules/openapi-generator-mill-plugin/src/main/scala/org/openapitools/generator/mill/OpenApiModule.scala">
<violation number="1" location="modules/openapi-generator-mill-plugin/src/main/scala/org/openapitools/generator/mill/OpenApiModule.scala:504">
P1: Logic is inverted: when `skipValidateSpec()` is true, should call `setValidateSpec(false)` to disable validation, not `true`.</violation>
<violation number="2" location="modules/openapi-generator-mill-plugin/src/main/scala/org/openapitools/generator/mill/OpenApiModule.scala:578">
P2: Missing `s` prefix for string interpolation. The literal `$spec` will be logged instead of the actual spec path.</violation>
</file>
<file name="modules/openapi-generator-mill-plugin/README.md">
<violation number="1" location="modules/openapi-generator-mill-plugin/README.md:139">
P2: Type mismatch: return type is `Map[String, String]` but value is `Seq(...)`. Should use `Map(...)` to match the declared return type.</violation>
<violation number="2" location="modules/openapi-generator-mill-plugin/README.md:151">
P2: Type mismatch: return type is `Map[String, String]` but value is `Seq(...)`. Should use `Map(...)` to match the declared return type.</violation>
</file>
<file name="modules/openapi-generator-mill-plugin/mill-test/mill.bat">
<violation number="1" location="modules/openapi-generator-mill-plugin/mill-test/mill.bat:9">
P3: Typo in comment: 'fronmatter' should be 'frontmatter'.</violation>
</file>
<file name="modules/openapi-generator-mill-plugin/mill-test/README.md">
<violation number="1" location="modules/openapi-generator-mill-plugin/mill-test/README.md:3">
P2: Incorrect Markdown syntax for GitHub alert. Use `[!NOTE]` (exclamation inside brackets) instead of `![Note]` to render a proper callout box.</violation>
</file>
<file name="modules/openapi-generator-mill-plugin/mill-test/api/petstore.yaml">
<violation number="1" location="modules/openapi-generator-mill-plugin/mill-test/api/petstore.yaml:342">
P3: Incorrect parameter description: says "ID of pet" but should say "ID of order" since this is the `getOrderById` operation on `/store/order/{orderId}`.</violation>
</file>
<file name="modules/openapi-generator-mill-plugin/mill-test/mill">
<violation number="1" location="modules/openapi-generator-mill-plugin/mill-test/mill:9">
P3: Typo in comment: "fronmatter" should be "frontmatter".</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
...api-generator-mill-plugin/src/main/scala/org/openapitools/generator/mill/OpenApiModule.scala
Show resolved
Hide resolved
...api-generator-mill-plugin/src/main/scala/org/openapitools/generator/mill/OpenApiModule.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 3 files (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="modules/openapi-generator-mill-plugin/mill-test/README.md">
<violation number="1" location="modules/openapi-generator-mill-plugin/mill-test/README.md:3">
P2: Incorrect GitHub alert syntax. The exclamation mark should be inside the brackets `[!NOTE]` not outside `![NOTE]`. The current syntax `![NOTE]` is image syntax and won't render as an alert box.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
resolves #22651
This PR provides a complete implementation of Openapitool for the Mill build tool
Mill is a Scala build tool which can also be used for Java, Kotlin and experimentally for Python, Typescript, Groovy. Its approach is at a sweet spot between Maven (purely declarative) and Gradle (programmable with a lot of plugin magic) since instead of plugins it just relies on tasks and simple libraries. Configuration is done via Scala code or Yaml.
All config-options from the current Maven & Gradle plugins have been evaluated and added in a similar fashion to keep friction as low as possible. Only for git settings and maven coordinates dedicated case-classes have been added since those configurations belong together.
In contrast to the Gradle plugin, this PR keeps everything under Maven control. So no external Mill executable is run as part of the build. The Mill testkit was used instead for testing via ScalaTest (because ScalaTest has integration to TestNG which is used by Openapitools).
Though the module contains a
mill-testsubproject, this is only meant for manual testing of edge-case configurations and it requires a previousmvn installto run properly.Technical Committee Scala: @clasnake @shijinkui @Bouillie @ramzimaalej
Summary by cubic
Add first-class Mill support via a new OpenApiModule to generate and validate code from OpenAPI specs, matching Maven/Gradle plugin options. Includes docs, tests, and build wiring for Docker and Maven. Resolves #22651.
New Features
Docs
Written for commit 1ca3904. Summary will update on new commits.