java - How to use apispark from CLI -
how can introspect existing restlet server resources?
i starting , ran errors:
java -cp lib/org.restlet.ext.apispark.jar:lib/org.restlet.jar:dist/myrestapi.jar org.restlet.ext.apispark.introspector -l swagger -v com.example.service.myrestservice -u xxx -p yyy
do need annotate server resources , how can accomplish resources , operations listed?
i tried extend swaggerapplication
, can @ to the lowest degree partial result see resources i'd see methods , annotate code corresponding documentation. how can achieved ? how have utilize swagger annotations restlet resources?
introspection
you should visit this page right dependencies (some missing) , syntax. in case, i'd seek this:
java -cp lib/*:dist/myrestapi.jar org.restlet.ext.apispark.introspector -v -u xxx -p yyy com.example.service.myrestservice
note: introspector under heavy refactoring , won't able upload definition apispark. i'll maintain updated when service in business.
swaggerapplication
the swaggerapplication serve swagger resource listing on /api-docs , api declarations on /api-docs/{pathtoapideclaration}. should able see methods on sec type of paths.
for online example, check http://petstore.swagger.wordnik.com/api/api-docs. resources dealing pets described here: http://petstore.swagger.wordnik.com/api/api-docs/pet (append path given in resource listing). same scheme observed swaggerapplication.
there back upwards of swagger annotations in next version or restlet working on topic, i'll update thread 1 time it's done. if urgent, might interested in looking @ lastly comments on this page.
hope helps,
java restlet swagger
No comments:
Post a Comment