I'm trying to use Swagger to write Play2 REST API, but swagger-play2 Unable to understand alternate parameters defined by doesn scala's option - the general way to create an ultimate alternative in Play 2:
Received / Documents Controller Document Controller (Q: Option [String]) I should optionally type q the option [string] one with the ultimate The matching is the annotated controller method I am receiving UNKOWN TYPE in the log and json swagger-ui created by api-docs breaks:
UNKNOWN TYPE: Scala.Option [info] play - Application start (Dev) What to specify an optional parameter in Play 2 and what do swargas understand?
One of the parameters I've found so far is to remove the ultimate from the parameter list, Swagger's Use @ApiImplicitParams Take the ultimate from the annotation and requested item in your controller method. Then Swagger Ultimate will be considered as optional.
Received / Controller of documents. Document Controller.Jet Document () and then in the Controller:
@OpOOptions (...) @APImailItEppetremes (Array (new API publisher (name = "Cue", value = "query", essential = false, datatype = "string", permutation = "query"),)) def getDocuments = action {root request = & gt; This is definitely not as good for using the Scala option type, but it produces the right swagger docs.
Comments
Post a Comment