swagger: "2.0"
info:
title: "API"
version: "1.0.0"
host: "petstore.swagger.io"
basePath: "/v1"
schemes:
- "http"
- "https"
paths:
/pets:
get:
operationId: "getPets"
produces:
- "application/json"
responses:
200:
schema:
$ref: "#/definitions/PetsResponse"
definitions:
PetsResponse:
type: "object"
properties:
pets:
type: "array"
items:
$ref: "#/definitions/Pet"
Pet:
type: "object"
properties:
id:
type: "integer"
name:
type: "string"
swagger-codegen generate -i codegen.yaml -l java -o output/client