Skip to content

Commit

Permalink
docs: fixing swagger path.
Browse files Browse the repository at this point in the history
  • Loading branch information
henvic committed Apr 8, 2019
1 parent 43ba897 commit 1ac9b2c
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
server:
go run ./cmd/server
write-apidocs:
swag init --generalInfo cmd/docs/docs.go
swag init --generalInfo cmd/server/main.go
apidocs:
go run -tags=swagon ./cmd/server
test:
Expand Down
20 changes: 17 additions & 3 deletions docs/docs.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2019-04-08 20:37:48.519911 -0300 -03 m=+0.025122009
// 2019-04-08 20:41:54.740953 -0300 -03 m=+0.048212400

package docs

Expand All @@ -12,10 +12,24 @@ import (
)

var doc = `{
"swagger": "2.0",
"info": {
"contact": {},
"license": {}
"description": "galaxy offers a drone navigation service (DNS).",
"title": "galaxy API",
"termsOfService": "http://example.com/terms/",
"contact": {
"name": "API Support",
"url": "http://example.com/support",
"email": "support@example.com"
},
"license": {
"name": "MIT",
"url": "https://opensource.org/licenses/MIT"
},
"version": "1.0"
},
"host": "localhost:9000",
"basePath": "/v1",
"paths": {
"/": {
"get": {
Expand Down
18 changes: 16 additions & 2 deletions docs/swagger.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
{
"swagger": "2.0",
"info": {
"contact": {},
"license": {}
"description": "galaxy offers a drone navigation service (DNS).",
"title": "galaxy API",
"termsOfService": "http://example.com/terms/",
"contact": {
"name": "API Support",
"url": "http://example.com/support",
"email": "support@example.com"
},
"license": {
"name": "MIT",
"url": "https://opensource.org/licenses/MIT"
},
"version": "1.0"
},
"host": "localhost:9000",
"basePath": "/v1",
"paths": {
"/": {
"get": {
Expand Down
16 changes: 14 additions & 2 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
basePath: /v1
definitions:
server.DNSRequest:
properties:
Expand Down Expand Up @@ -32,9 +33,19 @@ definitions:
example: 404
type: integer
type: object
host: localhost:9000
info:
contact: {}
license: {}
contact:
email: support@example.com
name: API Support
url: http://example.com/support
description: galaxy offers a drone navigation service (DNS).
license:
name: MIT
url: https://opensource.org/licenses/MIT
termsOfService: http://example.com/terms/
title: galaxy API
version: "1.0"
paths:
/:
get:
Expand Down Expand Up @@ -92,3 +103,4 @@ paths:
summary: Show a DNS location
tags:
- galaxy
swagger: "2.0"

0 comments on commit 1ac9b2c

Please sign in to comment.