@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Swagger Petstore - OpenAPI 3.0
@base /api/v3
@version 1.0.27
@auth OAuth2 | ApiKey api_key in header
@endpoints 19
@toc pet(8), store(4), user(7)

@group pet
@endpoint PUT /pet
@required {name: str, photoUrls: [str]}
@optional {id: int(int64), category: map{id: int(int64), name: str}, tags: [map{id: int(int64), name: str}], status: str(available/pending/sold)}
@returns(200) {id: int(int64), name: str, category: map{id: int(int64), name: str}, photoUrls: [str], tags: [map], status: str}
@errors {400, 404, 422}

@endpoint POST /pet
@required {name: str, photoUrls: [str]}
@optional {id: int(int64), category: map{id: int(int64), name: str}, tags: [map{id: int(int64), name: str}], status: str(available/pending/sold)}
@returns(200) {id: int(int64), name: str, category: map{id: int(int64), name: str}, photoUrls: [str], tags: [map], status: str}
@errors {400, 422}

@endpoint GET /pet/findByStatus
@required {status: str(available/pending/sold)=available}
@returns(200)
@errors {400}

@endpoint GET /pet/findByTags
@required {tags: [str]}
@returns(200)
@errors {400}

@endpoint GET /pet/{petId}
@required {petId: int(int64)}
@returns(200) {id: int(int64), name: str, category: map{id: int(int64), name: str}, photoUrls: [str], tags: [map], status: str}
@errors {400, 404}

@endpoint POST /pet/{petId}
@required {petId: int(int64)}
@optional {name: str, status: str}
@returns(200) {id: int(int64), name: str, category: map{id: int(int64), name: str}, photoUrls: [str], tags: [map], status: str}
@errors {400}

@endpoint DELETE /pet/{petId}
@required {petId: int(int64)}
@optional {api_key: str}
@returns(200)
@errors {400}

@endpoint POST /pet/{petId}/uploadImage
@required {petId: int(int64)}
@optional {additionalMetadata: str}
@returns(200) {code: int(int32), type: str, message: str}
@errors {400, 404}

@endgroup

@group store
@endpoint GET /store/inventory
@returns(200)

@endpoint POST /store/order
@optional {id: int(int64), petId: int(int64), quantity: int(int32), shipDate: str(date-time), status: str(placed/approved/delivered), complete: bool}
@returns(200) {id: int(int64), petId: int(int64), quantity: int(int32), shipDate: str(date-time), status: str, complete: bool}
@errors {400, 422}

@endpoint GET /store/order/{orderId}
@required {orderId: int(int64)}
@returns(200) {id: int(int64), petId: int(int64), quantity: int(int32), shipDate: str(date-time), status: str, complete: bool}
@errors {400, 404}

@endpoint DELETE /store/order/{orderId}
@required {orderId: int(int64)}
@returns(200)
@errors {400, 404}

@endgroup

@group user
@endpoint POST /user
@optional {id: int(int64), username: str, firstName: str, lastName: str, email: str, password: str, phone: str, userStatus: int(int32)}
@returns(200) {id: int(int64), username: str, firstName: str, lastName: str, email: str, password: str, phone: str, userStatus: int(int32)}

@endpoint POST /user/createWithList
@returns(200) {id: int(int64), username: str, firstName: str, lastName: str, email: str, password: str, phone: str, userStatus: int(int32)}

@endpoint GET /user/login
@optional {username: str, password: str}
@returns(200)
@errors {400}

@endpoint GET /user/logout
@returns(200)

@endpoint GET /user/{username}
@required {username: str}
@returns(200) {id: int(int64), username: str, firstName: str, lastName: str, email: str, password: str, phone: str, userStatus: int(int32)}
@errors {400, 404}

@endpoint PUT /user/{username}
@required {username: str}
@optional {id: int(int64), username: str, firstName: str, lastName: str, email: str, password: str, phone: str, userStatus: int(int32)}
@returns(200)
@errors {400, 404}

@endpoint DELETE /user/{username}
@required {username: str}
@returns(200)
@errors {400, 404}

@endgroup

@end
