Git Product home page Git Product logo

swagger's People

Contributors

ajay-kmr avatar binlecode avatar

Stargazers

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

Watchers

 avatar  avatar

swagger's Issues

Issues when used in Grails 3.3.0

I added the swagger plugin to our Grails 3.3.0 project which uses Mongo DB. The integration tests started failing with these errors:
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.grails.datastore.mapping.mongo.MongoDatastore]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/hibernate/validator/spi/resourceloading/ResourceBundleLocator at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:154) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:122) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:271)
Since we're using Mongo, I was surprised to see these Hibernate-related errors. Am not really sure what's the issue, but I took a quick run at upgrading the swagger plugin to use Grails 3.3. I made the minimal changes to get the plugin to build, but the same issue occurred after I tried the 3.3 upgraded plugin. Am still investigating...

Note: I found that by adding Hibernate5 back into the dependencies, the issue went away; however, we don't want to pollute out dependencies with Hibernate. Also, doing so add further complications, like having to add special mapping configuration to each domain to get it to use Mongo.

Grails 4

Seems that the plugin is not working with grails 4. is there any plan to support it?

I'll try again maybe with an demo project to investigate better

ImplicitParams are not being retrieved

Hello,

Thanks for provinding this great plugin. However I have done the setup as stated, all the responses and api params are properly described with exception of the Request Params. I have tried different types and combinations, but they seem to be ignored by the service.

Could you please review this code part?

Thanks,
Andrio

Including this plugin stops logback logging from working in my application

Steps to reproduce

  1. Create new Grails 3 application
  2. Create dummy service method with log.info messages
  3. Configure logback.groovy so that log messages appear in the console (logger('grails.app', DEBUG)
  4. Add dependency on Swagger plugin (1.0.0)
  5. Re-run app - log messages do not appear

Any suggestions you might have would be greatly appreciated.

swagger-ui version (2.2.5) is hardcoded, but should be configurable

Version of used swagger-ui library is hardcoded in ApiDocController:
redirect uri: "/webjars/swagger-ui/2.2.5/index.html?url=${request.getRequestURI()}"

Users should be able to add their own version of swagger-ui library in build.gradle and use it instead of 'default' version, provided with a plugin. I suggest moving swagger-ui library version in configuration file (application.yaml/application.groovy).

No support for UTF-8 encoding

ApiDocController does not support fetching HTML content from webjars (swagger-ui) with UTF-8, so international characters (like Cyrillic) from swagger annotations descriptions are rendered incorrectly (with question marks - '?')

Feature Request: Support JAX-RS annotation @Path

Hi, thanks for valuable products.
Do you have any plan to support JAX-RS annotations, especcially @java.ws.rs.Path?

I know the document says:

Note:
Only annotations provided by swagger-core are supported and JAX-RS annotations are not supported.

But when generate java(okhttp-gson) SDK source code by swagger-codegen from annotated controller, @path annotation of JAX-RS are very required.
Because when generating swagger yaml from annotated grails application,
"nickname" property effects not only "operationId" but also changes "path" property.

We have to prevent that the "path" change, by using @path to override path change by "nickname".

Place to configure validatorUrl

In application.groovy I added an additional line to disable validation
swagger { // https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md validatorUrl = null }
Nevertheless the error badge due to failing validation (firewall) remains. Did I set the option in the wrong place?

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.