forked from loafle/openapi-generator-original
* Add go-chi generator to go-server * Add go-chi configs * Add go-chi generated output * Updated docs * Add some javadocs * Fix import issue * Regen files
29 lines
709 B
Go
29 lines
709 B
Go
/*
|
|
* OpenAPI Petstore
|
|
*
|
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
|
*
|
|
* API version: 1.0.0
|
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
|
*/
|
|
|
|
package petstoreserver
|
|
|
|
//Response return a ImplResponse struct filled
|
|
func Response(code int, body interface{}) ImplResponse {
|
|
return ImplResponse {
|
|
Code: code,
|
|
Headers: nil,
|
|
Body: body,
|
|
}
|
|
}
|
|
|
|
//ResponseWithHeaders return a ImplResponse struct filled, including headers
|
|
func ResponseWithHeaders(code int, headers map[string][]string, body interface{}) ImplResponse {
|
|
return ImplResponse {
|
|
Code: code,
|
|
Headers: headers,
|
|
Body: body,
|
|
}
|
|
}
|