Last active
November 25, 2015 17:30
-
-
Save drewwells/f6bad58215d15ab0d8b4 to your computer and use it in GitHub Desktop.
This file contains 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 classification API. | |
// | |
// the purpose of this application is to provide an application | |
// that is using plain go code to define an API | |
// | |
// | |
// Schemes: https | |
// Host: localhost | |
// Version: 0.0.1 | |
// | |
// Consumes: | |
// - application/json | |
// | |
// Produces: | |
// - application/json | |
// | |
// | |
// swagger:meta | |
package gist | |
import "net/http" | |
type Booking struct { | |
} | |
// BookingResponse represents a scheduled appointment | |
// | |
// swagger:response BookingResponse | |
type BookingResponse struct { | |
// Booking struct | |
// | |
// in: body | |
// required: true | |
Booking Booking `json:"booking"` | |
} | |
// Bookings swagger:route GET /admin/bookings/ booking Bookings | |
// | |
// Bookings lists all the appointments that have been made on the site. | |
// | |
// | |
// Consumes: | |
// application/json | |
// | |
// Schemes: http, https | |
// | |
// Produces: | |
// application/json | |
// | |
// Responses: | |
// 200: BookingResponse | |
func bookings(w http.ResponseWriter, r *http.Request) { | |
} |
This file contains 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
{ | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"schemes": [ | |
"https" | |
], | |
"swagger": "2.0", | |
"info": { | |
"description": "the purpose of this application is to provide an application\nthat is using plain go code to define an API", | |
"title": "API.", | |
"version": "0.0.1" | |
}, | |
"host": "localhost", | |
"paths": { | |
"/admin/bookings/": { | |
"get": { | |
"consumes": [ | |
"application/json" | |
], | |
"produces": [ | |
"application/json" | |
], | |
"schemes": [ | |
"http", | |
"https" | |
], | |
"tags": [ | |
"booking" | |
], | |
"summary": "Bookings lists all the appointments that have been made on the site.", | |
"operationId": "Bookings", | |
"responses": { | |
"200": { | |
"$ref": "#/responses/BookingResponse" | |
} | |
} | |
} | |
} | |
}, | |
"definitions": { | |
"Booking": { | |
"type": "object", | |
"x-go-package": "bitbucket.org/fitkiq/api/gist" | |
}, | |
"BookingResponse": { | |
"description": "BookingResponse represents a scheduled appointment", | |
"type": "object", | |
"required": [ | |
"booking" | |
], | |
"properties": { | |
"booking": { | |
"description": "Booking struct\n\nin: body", | |
"x-go-name": "Booking", | |
"$ref": "#/definitions/Booking" | |
} | |
}, | |
"x-go-package": "bitbucket.org/fitkiq/api/gist" | |
} | |
}, | |
"responses": { | |
"BookingResponse": { | |
"description": "BookingResponse represents a scheduled appointment", | |
"schema": { | |
"$ref": "#/definitions/Booking" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment