Comments (11)
It would be great to get Open API v3 validation.
from gradle-swagger-generator-plugin.
I am using 2.18.1 version. The validateSwagger task is failed when it validates openapi.yaml (3.0.2).
from gradle-swagger-generator-plugin.
At this time the JSON schema of OpenAPI 3.0 is not available yet (OAI/OpenAPI-Specification#1032). Please skip the validation.
Other tools seem:
- Code generation: Supported in 3.0 (currently snapshot version)
- Swagger UI: Supported in 3.12
- ReDoc: Not yet (Redocly/redoc#312)
from gradle-swagger-generator-plugin.
Is the plugin able to generate code when skipping the validation for OpenAPI 3.0?
from gradle-swagger-generator-plugin.
Yes. Just run the generateSwaggerCode
task.
Sorry I have tested code generation with the latest snapshot version of swagger-codegen-cli
but it does not work for now.
from gradle-swagger-generator-plugin.
Just an FYI, the JSON Schema will not be able to completely validate an OpenAPI document. It can partially validate it, but if you need a valid OpenAPI description you should not rely on JSON Schema.
from gradle-swagger-generator-plugin.
I've used jitpack to get plugin working. Used the commit I used to test my fix to generators:
// Substitute generators module
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'io.swagger' && details.requested.name == 'swagger-codegen-generators' && details.requested.version == '1.0.0-SNAPSHOT') {
details.useTarget "com.github.motorro:swagger-codegen-generators:772f1c3e8b9efc7d7220c96067870471895054cb"
}
}
}
dependencies {
// Codegen dependency
swaggerCodegen 'com.github.swagger-api:swagger-codegen:b5c8b2162f5f34ff8db10c87461ea6e8aa066f76'
// Generators dependency
swaggerCodegen 'com.github.motorro:swagger-codegen-generators:772f1c3e8b9efc7d7220c96067870471895054cb'
}
Used as a temporary solution of course - just to get my model and API definition in a client project.
from gradle-swagger-generator-plugin.
Hi!
Can't use the new V3 generator because it is moved to a newer package.
Caused by: java.lang.IllegalStateException: Add swagger-codegen-cli to dependencies of the project as follows:
dependencies {
swaggerCodegen 'io.swagger:swagger-codegen-cli:x.x.x'
}
...
Caused by: java.lang.ClassNotFoundException: io.swagger.codegen.SwaggerCodegen
It is now:
io.swagger.codegen.v3:swagger-codegen-cli:3.0.0
When can we expect support for this one?
from gradle-swagger-generator-plugin.
Yes, the new 3.x line will be supported in the near future.
from gradle-swagger-generator-plugin.
I have released 2.14.0 and now it supports Swagger Codegen V3.
https://github.com/int128/gradle-swagger-generator-plugin/releases/tag/2.14.0
Note that it does not yet support OpenAPI 3 YAML validation.
from gradle-swagger-generator-plugin.
I have released 2.14.0 and now it supports Swagger Codegen V3.
https://github.com/int128/gradle-swagger-generator-plugin/releases/tag/2.14.0Note that it does not yet support OpenAPI 3 YAML validation.
Hi!
I'm using version 2.16.0 and Swagger Codegen V3 doesn't seem to support Server Templating:
16:56:54.780 [Thread-388] WARN io.swagger.codegen.v3.utils.URLPathUtil - Not valid URL: https://test.api.com:{port}/{basePath}
java.net.MalformedURLException: For input string: "{port}"
at java.net.URL.(URL.java:627)
at java.net.URL.(URL.java:490)
at java.net.URL.(URL.java:439)
at io.swagger.codegen.v3.utils.URLPathUtil.getServerURL(URLPathUtil.java:30)
at io.swagger.codegen.v3.generators.java.SpringCodegen.preprocessOpenAPI(SpringCodegen.java:428)
at io.swagger.codegen.v3.DefaultGenerator.configureGeneratorProperties(DefaultGenerator.java:193)
at io.swagger.codegen.v3.DefaultGenerator.generate(DefaultGenerator.java:714)
at io.swagger.codegen.v3.cli.cmd.Generate.run(Generate.java:330)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NumberFormatException: For input string: "{port}"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.parseInt(Integer.java:615)
at java.net.URLStreamHandler.parseURL(URLStreamHandler.java:222)
at java.net.URL.(URL.java:622)
... 8 common frames omitted
from gradle-swagger-generator-plugin.
Related Issues (20)
- A Release hasn't been made since Feb 2020. Missing OAS3 verification which is in master HOT 1
- Android Studio 2020.3.1 (latest stable) requires Gradle 7 + tweaks to plugin HOT 1
- Dependency Dashboard
- Action Required: Fix Renovate Configuration
- The latest release no longer supports Java 11 HOT 3
- JAVA 8 support for the plugin HOT 3
- False usage of gradle cache on new code generator version HOT 1
- No duplicate handling strategy has been set for task resolveSwaggerTemplate HOT 2
- Plugin generates new files despite the inputFiles are not changed since the last generation
- Can't generate SwaggerUI with plugin version 2.19.2 HOT 2
- New versions are not compatible with gradle 6.x
- Problem generating Java code with schema property "oneOf"
- Move to latest Gradle API and best practices HOT 5
- Response for Controller with type of "Map of Map" is not properly generated.
- oneOf Polymorphism Broken
- Using `resttemplate` and `useBeanValidation` does not include `validation-api` HOT 1
- Support jakarta imports HOT 1
- Question: Please could you indicate how to generate the client code? HOT 1
- Configuration cache HOT 3
- Specifying skipFormModel global property does not work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-swagger-generator-plugin.