Git Product home page Git Product logo

swagger-doclet's People

Contributors

asmolich avatar bleshik avatar conorroche avatar decbis avatar espnmichaelkidd avatar glucas avatar ieure avatar jerome-leclercq avatar joepadmiraal avatar jplock avatar jschwartz73 avatar leelynne avatar mhardorf avatar pp-tim avatar ravichandrasadineni avatar ryankennedy avatar sewolf avatar sldblog avatar smecsia avatar tandrup avatar thenative avatar zdila avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swagger-doclet's Issues

Can't run swagger-doclet-sample-jersey2

There are no instructions/readme for how to run it, and just compiling + running the jar results in the error:

Exception in thread "main" java.lang.RuntimeException: java.lang.ClassNotFoundException: org.glassfish.jersey.internal.RuntimeDelegateImpl
    at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:152)
    at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120)
    at javax.ws.rs.core.UriBuilder.newInstance(UriBuilder.java:95)
    at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:119)
    at com.tenxerconsulting.swagger.doclet.sample.App.getBaseURI(App.java:74)
    at com.tenxerconsulting.swagger.doclet.sample.App.startServer(App.java:27)
    at com.tenxerconsulting.swagger.doclet.sample.App.main(App.java:49)
Caused by: java.lang.ClassNotFoundException: org.glassfish.jersey.internal.RuntimeDelegateImpl
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:115)
    at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:225)
    at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:135)
    ... 6 more

Support Java 9+

When including swagger-doclet as a dependency and with Java 9+, a maven dependepency resolution error occurs. This problem is due to the use of the following profile in the project pom:

<profiles>
		<profile>
			<id>default-tools.jar</id>
			<activation>
				<property>
					<name>java.vendor</name>
					<value>Oracle Corporation</value>
				</property>
			</activation>
			<dependencies>
				<dependency>
					<groupId>com.sun</groupId>
					<artifactId>tools</artifactId>
					<version>1.7.0</version>
					<scope>system</scope>
					<systemPath>${java.home}/../lib/tools.jar</systemPath>
				</dependency>
			</dependencies>
		</profile>
	</profiles>

Example of the error when using openJDK 11

[ERROR] Failed to execute goal on project example: Could not resolve dependencies for project com.example:example:jar:openjdk11-SNAPSHOT: Could not find artifact com.sun:tools:jar:1.7.0 at specified path C:\dev\jdk-11.0.1/../lib/tools.jar -> [Help 1]

I haven't yet found a way to cleanly disable the profile dependency in a project using swagger-doclet. Could somebody point me to a workaround, or fix this in this project by include a version in the profile activation section?

Infinite loop when processing recursive references

Example:

    @JsonSubTypes({
            @JsonSubTypes.Type(value = AImpl.class)
    })
    abstract class A {
    }

    class AImpl extends A {
        public B b;
    }

    @JsonSubTypes({
            @JsonSubTypes.Type(value = BImpl.class)
    })
    abstract class B {
    }

    class BImpl extends B {
        public A a;
    }

When parsing these models with ApiModelParser, it falls into infinitely looping.

Cannot resolve Swagger-doclet using Gradle

`apply plugin: 'java'

configurations {
doclet
}

repositories {
mavenLocal()
mavenCentral()
}

dependencies {
doclet(
[group: 'com.tenxerconsulting', name: 'swagger-doclet', version: '1.0.7'],
[group: 'javax.ws.rs', name: 'javax.ws.rs-api', version: '2.0']
)
}

task generateRestApiDocs(type: Javadoc) {
source = sourceSets.main.allJava
destinationDir = reporting.file("rest-api-docs")
options.classpath = configurations.doclet.files.asType(List)
options.docletpath = configurations.doclet.files.asType(List)
options.doclet = "com.tenxerconsulting.swagger.doclet.ServiceDoclet"
options.addStringOption("apiVersion", "1")
options.addStringOption("docBasePath", "/sps/apidocs")
options.addStringOption("apiBasePath", "/sps")
options.addBooleanOption("skipUiFiles", true)
}`

I have added all of the above to my build.gradle. Whenever I build the project the build fails.

"A problem occurred evaluatiing root project: 'myproject'.
Could not resolve all dependencies for configuration ':doclet'.
Could not download artifact 'com.tenxerconsulting:swagger-doclet:1.0.7@jar'
Artifact 'com.tenxerconsulting:swagger-doclet:1.0.7@jar' not found.

Any ideas?

Edit:

Changed the version to 1.1.3 and it was successful in downloading the dependency, however my project uses Java 7 so i need 1.0.7

@responseType com.example.Generic<T>

Add support for Generic declerations. When the Generic class has a attribute with type T it will be resolved to T when generating the documentation. Today it is only shown as undfefined.

Embedded Swagger UI Incompatible with generated json?

The embedded swagger UI reports an error:

{"schemaValidationMessages":[{"level":"error","message":"Deprecated Swagger version.  Please visit http://swagger.io for information on upgrading to Swagger 2.0\""}]}

When pointed at the service.json generated. However, from the changelog, it looks like Swagger-UI 2.1.0 was added recently, in version 1.1.1 (i am using 1.1.3) and did work at that time, so I'm not sure whether this is a bug or potential user error.

Can't get swagger documentation

hello everyone
iam new to swagger
i need your help to understand how things go
actually, i'm using swagger doclet to generate swagger specification for a rest API
i used the directives from https://github.com/conorroche/swagger-doclet
i added the maven part
but nothing was generated
im expecting service.json file
can anyone give me some help ?

Request support for org.springframework.data.domain.Page

Hello,

We have few services where response is of Type org.springframework.data.domain.Page. We need swagger-doclet to support org.springframework.data.domain.Page so that responseType is handled just like list or map.

Eg
/**
*
* @param someParam
* @responseType org.springframework.data.domain.Page <someCustomObject>
*/

@get
@path("/getSomePage")
@produces(MediaType.APPLICATION_JSON)
public Response getSomePage(@QueryParam("someParam") String someParam) ;

Regards,
KPuranik

Support Java 9+

When including swagger-doclet as a dependency and with Java 9+, a maven dependepency resolution error occurs. This problem is due to the use of the following profile in the project pom:

<profiles>
		<profile>
			<id>default-tools.jar</id>
			<activation>
				<property>
					<name>java.vendor</name>
					<value>Oracle Corporation</value>
				</property>
			</activation>
			<dependencies>
				<dependency>
					<groupId>com.sun</groupId>
					<artifactId>tools</artifactId>
					<version>1.7.0</version>
					<scope>system</scope>
					<systemPath>${java.home}/../lib/tools.jar</systemPath>
				</dependency>
			</dependencies>
		</profile>
	</profiles>

Example of the error when using openJDK 11

[ERROR] Failed to execute goal on project example: Could not resolve dependencies for project com.example:example:jar:openjdk11-SNAPSHOT: Could not find artifact com.sun:tools:jar:1.7.0 at specified path C:\dev\jdk-11.0.1/../lib/tools.jar -> [Help 1]

I haven't yet found a way to cleanly disable the profile dependency in a project using swagger-doclet. Could somebody point me to a workaround, or fix this in this project by include a version in the profile activation section?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.