feat(docs): Swagger generation
This commit is contained in:
53
docs/docs.go
Normal file
53
docs/docs.go
Normal file
@@ -0,0 +1,53 @@
|
||||
// Package docs Code generated by swaggo/swag. DO NOT EDIT
|
||||
package docs
|
||||
|
||||
import "github.com/swaggo/swag"
|
||||
|
||||
const docTemplate = `{
|
||||
"schemes": {{ marshal .Schemes }},
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "{{escape .Description}}",
|
||||
"title": "{{.Title}}",
|
||||
"contact": {},
|
||||
"version": "{{.Version}}"
|
||||
},
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "{{.BasePath}}",
|
||||
"paths": {
|
||||
"/contracts": {
|
||||
"post": {
|
||||
"description": "Generate a contract based on the provided data",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/pdf"
|
||||
],
|
||||
"tags": [
|
||||
"contracts"
|
||||
],
|
||||
"summary": "Generate a contract",
|
||||
"responses": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`
|
||||
|
||||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||||
var SwaggerInfo = &swag.Spec{
|
||||
Version: "",
|
||||
Host: "",
|
||||
BasePath: "",
|
||||
Schemes: []string{},
|
||||
Title: "LfK Document Server API",
|
||||
Description: "This is the API documentation for the LfK Document Server - a tool for pdf generation.",
|
||||
InfoInstanceName: "swagger",
|
||||
SwaggerTemplate: docTemplate,
|
||||
LeftDelim: "{{",
|
||||
RightDelim: "}}",
|
||||
}
|
||||
|
||||
func init() {
|
||||
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
||||
}
|
||||
26
docs/swagger.json
Normal file
26
docs/swagger.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "This is the API documentation for the LfK Document Server - a tool for pdf generation.",
|
||||
"title": "LfK Document Server API",
|
||||
"contact": {}
|
||||
},
|
||||
"paths": {
|
||||
"/contracts": {
|
||||
"post": {
|
||||
"description": "Generate a contract based on the provided data",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/pdf"
|
||||
],
|
||||
"tags": [
|
||||
"contracts"
|
||||
],
|
||||
"summary": "Generate a contract",
|
||||
"responses": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
18
docs/swagger.yaml
Normal file
18
docs/swagger.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
info:
|
||||
contact: {}
|
||||
description: This is the API documentation for the LfK Document Server - a tool
|
||||
for pdf generation.
|
||||
title: LfK Document Server API
|
||||
paths:
|
||||
/contracts:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Generate a contract based on the provided data
|
||||
produces:
|
||||
- application/pdf
|
||||
responses: {}
|
||||
summary: Generate a contract
|
||||
tags:
|
||||
- contracts
|
||||
swagger: "2.0"
|
||||
Reference in New Issue
Block a user