This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@GET | |
@Path("/findByStatus") | |
@ApiOperation(value = "Finds Pets by status", | |
notes = "Multiple status values can be provided with comma seperated strings", | |
responseClass = "com.wordnik.swagger.sample.model.Pet", multiValueResponse = true) | |
@ApiErrors(Array( | |
new ApiError(code = 400, reason = "Invalid status value"))) | |
def findPetsByStatus( | |
@ApiParam(value = "Status values that need to be considered for filter", required = true, defaultValue = "available", | |
allowableValues = "available,pending,sold", allowMultiple = true)@QueryParam("status") status: String) = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.wordnik.client | |
import com.wordnik.client.api._ | |
import com.wordnik.client.model._ | |
import com.wordnik.swagger.runtime.common._ | |
object Test { | |
def main(args: Array[String]) = { | |
val securityHandler = new ApiKeyAuthTokenBasedSecurityHandler("{YOUR_KEY}", null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# process for creating a scala library for a swagger-enabled server | |
# build the codegen | |
ant | |
# generate the client library with the default (empty) api_key | |
./bin/generate-scala-lib.sh http://api.wordnik.com/v4 "" com.wordnik.client generated | |
# copy the sample build script | |
cp conf/scala/sample/* generated/ |
NewerOlder