springfox / springfox-javadoc

Ability to use Javadoc for documentation for generating OpenAPI specifications
Apache License 2.0
17 stars 15 forks source link

Can official provide a simple demo #2

Open zhaojigang opened 6 years ago

zhaojigang commented 6 years ago

Can official provide a simple demo

ghost commented 6 years ago

What do you expect from a demo? Is there something you don't understand? Everything that is needed to run this is written in the README.md file.

MahatmaFatalError commented 6 years ago

A checkout and run demo project would be great. The README.md only depicts fragments...

ghost commented 6 years ago

Setting this up is really easy. You simply make sure the doclet is run and that the JavadocPluginConfiguration is added to the spring context. How you do this depends entirely on your project. Are you using maven, or gradle, or something else to build your project? Are you using Spring Boot? Are you using annotations or xml files or a combination of both to set up your spring context? How do you package your application? To give examples for each case I'd have to provide and maintain multiple demo projects that really don't serve any purpose. I cannot cover all possible scenarios. You should know how to run a doclet using your build environment. An example for maven is provided. Adding a configuration to the spring context is also basic stuff. If you have a specific problem getting this to work, please open a separate issue and I will try to help you make it work for your project.

aramir commented 6 years ago

Hey, it's up to you, but +1 the guys above - README.md is less than friendly. It doesn't mention that you need to build the stuff (rather than including as dependency) and no instructions on how to build, no sample for gradle, etc. Yes, it's all could be inferred - and I did just that - but that's like providing no javadoc for your public code and saying "you can figure out how it works from the code, its simple". What is simple for you may be... less simple to others.

Again, up to you in the end -- but for some reason springfox itself has a good reference documentation, rather than just a quick sample in the readme.md

thanks for the excellent library!

neumaennl commented 6 years ago

Hi @aramir,

I agree that there can never be too much documentation. Unfortunately, I don't know gradle. If you have a working example using gradle, would you be so kind to provide a pull request for the README.md?

jaredhodge commented 6 years ago

Maybe you could show how to run things from the command line (i.e. not in a build system), and we could help with converting it. I actually want to use it from a project that builds with ant.

dilipkrish commented 6 years ago

Sorry @jaredhodge Im just getting to this... will try to get something if someone from the community hasn't contributed yet

jaredhodge commented 6 years ago

@dilipkrish ; I haven't seen anything from the community yet. Some sort of non-maven example would be very helpful.

dagnelies commented 6 years ago

Anything would be good ...I didn't get it to run correctly even after having poured hours of effort into it because of missing documentation / example. Just give us "something" that runs and we would be happy.

...this has lots of potential IMHO ...but without people being able to run it, it becomes worthless code lying around.

dilipkrish commented 6 years ago

@dagnelies @jaredhodge sorry this project has been ignored a little bit 😳Will update this instructions

amutsch commented 5 years ago

@dilipkrish I see there is an examples repo located at https://github.com/springfox/springfox-demos. Are there more examples you think are needed. I'm trying to help where I can while learning Springfox so could create some samples that are needed.

dagnelies commented 5 years ago

@amutsch None of the examples there cover this project.

This project is about generating static swagger doc using the javadoc comments.

I think everybody would be happy to see a single demo of this thing working 😋

amutsch commented 5 years ago

@dagnelies I will see what I can fit in this week. With Holidays approaching time is a little lighter.

@dilipkrish I'll start putting a sample together for addition to the springfox-demos repo. Let me know if that is not the place you would like it. Also let me know if you feel other samples may be useful and I can start to work through some of them.