Dependency update
- Updated swagger.yaml with swag v1.6.105. - Updated module isp-lib to v2.6.1 - Included to import swagger docs - Updated go.mod
This commit is contained in:
1 parent
24d03b5dbe
commit
e8cc55b7ff
5 files changed
+162
-75
No files matched your search
+17
-44
@@ -1,15 +1,11 @@
|
||||
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||
// This file was generated by swaggo/swag
|
||||
// This file was generated by swaggo/swag at
|
||||
// 2020-09-02 11:50:09.819512899 +0300 MSK m=+24.009697076
|
||||
|
||||
package docs
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"strings"
|
||||
|
||||
"github.com/alecthomas/template"
|
||||
"github.com/swaggo/swag"
|
||||
"github.com/integration-system/isp-lib/v2/docs"
|
||||
)
|
||||
|
||||
var doc = `{
|
||||
@@ -182,6 +178,9 @@ var doc = `{
|
||||
"definitions": {
|
||||
"domain.BatchExecuteByIdsRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"ids"
|
||||
],
|
||||
"properties": {
|
||||
"arg": {
|
||||
"type": "object"
|
||||
@@ -207,6 +206,9 @@ var doc = `{
|
||||
},
|
||||
"domain.ExecuteByIdRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id"
|
||||
],
|
||||
"properties": {
|
||||
"arg": {
|
||||
"type": "object"
|
||||
@@ -218,6 +220,9 @@ var doc = `{
|
||||
},
|
||||
"domain.ExecuteRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"script"
|
||||
],
|
||||
"properties": {
|
||||
"arg": {
|
||||
"type": "object"
|
||||
@@ -231,6 +236,7 @@ var doc = `{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/domain.Error"
|
||||
},
|
||||
"result": {
|
||||
@@ -258,49 +264,16 @@ var doc = `{
|
||||
}
|
||||
}`
|
||||
|
||||
type swaggerInfo struct {
|
||||
Version string
|
||||
Host string
|
||||
BasePath string
|
||||
Schemes []string
|
||||
Title string
|
||||
Description string
|
||||
}
|
||||
|
||||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||||
var SwaggerInfo = swaggerInfo{
|
||||
var SwaggerInfo = docs.SwaggerInfo{
|
||||
Version: "1.0.0",
|
||||
Host: "localhost:9024",
|
||||
Host: "localhost:9000",
|
||||
BasePath: "/api/script",
|
||||
Schemes: []string{},
|
||||
Title: "isp-script-service",
|
||||
Description: "{описание сервиса}",
|
||||
}
|
||||
|
||||
type s struct{}
|
||||
|
||||
func (s *s) ReadDoc() string {
|
||||
sInfo := SwaggerInfo
|
||||
sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
|
||||
|
||||
t, err := template.New("swagger_info").Funcs(template.FuncMap{
|
||||
"marshal": func(v interface{}) string {
|
||||
a, _ := json.Marshal(v)
|
||||
return string(a)
|
||||
},
|
||||
}).Parse(doc)
|
||||
if err != nil {
|
||||
return doc
|
||||
}
|
||||
|
||||
var tpl bytes.Buffer
|
||||
if err := t.Execute(&tpl, sInfo); err != nil {
|
||||
return doc
|
||||
}
|
||||
|
||||
return tpl.String()
|
||||
Description: "Сервис для обработка и выполения JavaScript скриптов",
|
||||
}
|
||||
|
||||
func init() {
|
||||
swag.Register(swag.Name, &s{})
|
||||
docs.InitSwagger(SwaggerInfo, doc)
|
||||
}
|
||||
+9
-2
@@ -8,6 +8,8 @@ definitions:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- ids
|
||||
type: object
|
||||
domain.Error:
|
||||
properties:
|
||||
@@ -22,6 +24,8 @@ definitions:
|
||||
type: object
|
||||
id:
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
domain.ExecuteRequest:
|
||||
properties:
|
||||
@@ -29,11 +33,14 @@ definitions:
|
||||
type: object
|
||||
script:
|
||||
type: string
|
||||
required:
|
||||
- script
|
||||
type: object
|
||||
domain.ScriptResp:
|
||||
properties:
|
||||
error:
|
||||
$ref: '#/definitions/domain.Error'
|
||||
type: object
|
||||
result:
|
||||
type: object
|
||||
type: object
|
||||
@@ -48,10 +55,10 @@ definitions:
|
||||
errorMessage:
|
||||
type: string
|
||||
type: object
|
||||
host: localhost:9024
|
||||
host: localhost:9000
|
||||
info:
|
||||
contact: {}
|
||||
description: '{описание сервиса}'
|
||||
description: Сервис для обработка и выполения JavaScript скриптов
|
||||
license:
|
||||
name: GNU GPL v3.0
|
||||
title: isp-script-service
|
||||
|
||||
Reference in new issue
Block a user