ryankennedy / swagger-jaxrs-doclet

Apache License 2.0
87 stars 136 forks source link

Exclude packages/classes #76

Closed enriquerodbe closed 10 years ago

enriquerodbe commented 10 years ago

I have some projects with classes that are just examples or for some reason don't want them to be included in swagger. Maybe an option could be added to exclude packages and or fully qualified class names from being parsed.

conorroche commented 10 years ago

my fork supports hiding deprecated resource classes (this can be disabled), hiding resource classes with the @hidden javadoc tag, and hiding resource classes who's FQN starts with any of the prefixes defined as the doclet option -excludeResourcePrefixes see https://github.com/Carma-Public/swagger-jaxrs-doclet

enriquerodbe commented 10 years ago

Cool, the only advantage of the original repo is it's published in maven central. @conorroche how difficult would it be to publish?

ESPNMichaelKidd commented 10 years ago

alternatively, perhaps @ryankennedy would accept a pull request or two from @conorroche, were they to be made, and we wouldn't have to keep track of which fork does what better...

ryankennedy commented 10 years ago

I've not really kept up with swagger-jaxrs-doclet for the last year or more. At this point it would be better if someone officially forked the repo and ran with it on their own if they're really passionate about using it and keeping it up to date.

On Tue, Aug 12, 2014 at 10:57 AM, Michael Kidd notifications@github.com wrote:

alternatively, perhaps @ryankennedy https://github.com/ryankennedy would accept a pull request or two from @conorroche https://github.com/conorroche, were they to be made, and we wouldn't have to keep track of which fork does what better...

— Reply to this email directly or view it on GitHub https://github.com/ryankennedy/swagger-jaxrs-doclet/issues/76#issuecomment-51951582 .

conorroche commented 10 years ago

ive fixed a lot of the issues/feature requests people raised on the fork but it outputs swagger ui 1.2 format only as that was all i needed, i was thinking my fork might make a good basis for a 1.0 release or a 0.5 release or else i may need to add in backward compatibility for 1.1 or 1.0 spec as they are quite different to 1.2, @ryankennedy i was going to suggest a pull request for a new branch/version, i am also happy to take over maintaining it, @enriquerodbe im working on jsonview at the moment, re publishing to maven central i can do that but want to work out what the artifact/group/version should be, @ryankennedy let me know what you think

conorroche commented 10 years ago

@enriquerodbe ive just committed support for json view to https://github.com/Carma-Public/swagger-jaxrs-doclet see the test fixture like https://github.com/Carma-Public/swagger-jaxrs-doclet/blob/master/jaxrs-doclet/src/test/resources/fixtures/jsonview/PersonResource.java

conorroche commented 10 years ago

@enriquerodbe i have now released v 1.0 of the my fork https://github.com/Carma-Public/swagger-jaxrs-doclet to maven central. I added in @beanparam support and merged the cross class and orig parser so both cross class resources and sub resources are supported out of the box. to use change the doclet config:

doclet class: com.carma.swagger.doclet.ServiceDoclet groupId: com.carma artifactId: swagger-doclet version:1.0

I won't have support for legacy 1.1 and 1.0 swagger spec done until the 1.1 release which wont be for a few weeks at least but will do any major bug fixes in the interim.

enriquerodbe commented 10 years ago

Thank you very much @conorroche. I'm already using your fork, but I had to freeze my version at a point where it worked for me. I created an issue showing my problem.