Comments (5)
Please note as part of Enterprise automation we would like to build the JSON specification during build lifecycle, I tried using swagger-maven-plugin to generate JSON file.. plugin configuration is as follows...
<plugin>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<version>2.0.5</version>
<configuration>
<outputFileName>registrationAPI-2</outputFileName>
<outputPath>${basedir}/target/</outputPath>
<outputFormat>JSON</outputFormat>
<resourcePackages>
<resourcePackage>com.altais.registration.controller</resourcePackage>
</resourcePackages>
<prettyPrint>true</prettyPrint>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>resolve</goal>
</goals>
</execution>
</executions>
</plugin>
when I ran the build, it generates 'registrationAPI-1.json' with a header element. It's incomplete does not have anything.. attached the file for reference
please advice to proceed further.
from swaggerhub-maven-plugin.
@vthanikachalam Can you provide us with more information about your Java project? Which framework do you use for your API? Is it JAX-RS based or Spring based?
from swaggerhub-maven-plugin.
It's Spring boot application, after running the application we could able to generate REST API documentation/schema by hitting/launching the URL http://localhost:port/application-context/v2/api-docs in the browser
But we would like to generate the REST API documentation/schema without running the application, we want to make use of the swagger-maven-plugin
Followed the step provided in the URL https://github.com/SmartBear/swaggerhub-maven-plugin but it did not work, it generates a kind of empty file
Please provide your support
from swaggerhub-maven-plugin.
https://github.com/SmartBear/swaggerhub-maven-plugin (this project) is intended to interact with SwaggerHub using existing files or files that are being generated during the build process. It does not generate an API definition from your code.
The swagger-maven-plugin
that's mentioned in the documentation, and what you shared above, only works with JAX-RS based APIs and not Spring ones. We do not provide a solution for Spring-based APIs ourselves. Depending on the library you use in Spring (whether it's Springfox or Springdocs) and depending on the version, there may be other solutions out there for compile-time generation of the API definition. Unfortunately, it is out of scope for what we provide.
from swaggerhub-maven-plugin.
Closing issue as it is not related to the swaggerhub-maven-plugin
project.
It is a question for swagger-maven-plugin
:
https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-maven-plugin
from swaggerhub-maven-plugin.
Related Issues (18)
- Push to SwaggerHub is formatted incorrectly HOT 1
- Add support for domains HOT 8
- Add support for yaml upload/download HOT 1
- Add support for on-premise SwaggerHub instances HOT 1
- Update Upload/Download Tests to use JUnit4 runner HOT 2
- Add default lifecycle phases
- Add support for downloading resolved specs HOT 4
- Plugin upload appears to be successful when misconfigured
- Proxy support HOT 2
- cannot download due to ssl handshake
- Not able to Upload HOT 1
- Add support for updating default version HOT 1
- extension with syncDirectory and syncFile goal (and get goal) HOT 1
- Execution config is ignored HOT 2
- Can't upload openapi.yaml file to swaggerhub HOT 2
- Add support to upload apis/domains to a specific project
- . HOT 1
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 swaggerhub-maven-plugin.