Hi Dennis
On 18/08/17 07:46, Dennis Kieselhorst wrote:
Hi Sergey!
I guess the feature would check the properties at the configurable
'swaggerPropertiesLocation', with "/swagger.properties" being the
default one, and then use them to set the simple Swagger properties
which has not been already set by SwaggerFeature setters ?
Yes, this makes sense, good idea.
Thanks, I've done some initial work on it, next step is to update again
the scan demo to show the auto-discovered feature can be initialized
from the properties, but I'd like to keep your demo code and migrate it
to a simple spring_boot demo, hope you are OK with it, will let you know
once I'm done
Thanks, Sergey
The other thing which is worth investigating is having SwaggerFeature
checking if swagger.json is already available on the class path (done
earlier by java2swagger) and if yes then do not register Swagger
ApiListing at all and register instead a simple resource (similar to
the
UI one) which will serve this swagger.json
Similarly, it would probably check for a /swagger.json resource with the
location being configurable, and if avail - then skip all that code
which registers ApiListing, etc, though may be it will become a bit too
messy, may be we should start with the above task first
Freeman - how do you serve those generated swagger.jsons, is it detected
by ApiListing or do you register some custom resource ?
This is definitely an improvement for API-First development. Currently I
have tests in place to ensure the generated swagger.json matches the
manually defined one.
Cheers
Dennis