Skip to content

chore: Add Terms of Access and General Description to the API #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cmd/staking-api-service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ func init() {
}
}

// @title Babylon Staking API
// @version 1.0
// @description The Babylon Staking API offers information about the state of the Phase-1 BTC Staking system.
// @description Your access and use is governed by the Terms of Service listed below.
// @license.name API Access License
// @license.url https://docs.babylonlabs.io/assets/files/api-access-license.pdf
// @contact.email contact@babylonlabs.io
func main() {
ctx := context.Background()

Expand Down
14 changes: 10 additions & 4 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ const docTemplate = `{
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"contact": {},
"contact": {
"email": "contact@babylonlabs.io"
},
"license": {
"name": "API Access License",
"url": "https://docs.babylonlabs.io/assets/files/api-access-license.pdf"
},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
Expand Down Expand Up @@ -641,12 +647,12 @@ const docTemplate = `{

// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "",
Version: "1.0",
Host: "",
BasePath: "",
Schemes: []string{},
Title: "",
Description: "",
Title: "Babylon Staking API",
Description: "The Babylon Staking API offers information about the state of the BTC Staking ecosystem.\nYour access and use is governed by the Terms of Service listed below.",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
Expand Down
11 changes: 10 additions & 1 deletion docs/swagger.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
{
"swagger": "2.0",
"info": {
"contact": {}
"description": "The Babylon Staking API offers information about the state of the BTC Staking ecosystem.\nYour access and use is governed by the Terms of Service listed below.",
"title": "Babylon Staking API",
"contact": {
"email": "contact@babylonlabs.io"
},
"license": {
"name": "API Access License",
"url": "https://docs.babylonlabs.io/assets/files/api-access-license.pdf"
},
"version": "1.0"
},
"paths": {
"/healthcheck": {
Expand Down
11 changes: 10 additions & 1 deletion docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,16 @@ definitions:
- UnprocessableEntity
- RequestTimeout
info:
contact: {}
contact:
email: contact@babylonlabs.io
description: |-
The Babylon Staking API offers information about the state of the BTC Staking ecosystem.
Your access and use is governed by the Terms of Service listed below.
license:
name: API Access License
url: https://docs.babylonlabs.io/assets/files/api-access-license.pdf
title: Babylon Staking API
version: "1.0"
paths:
/healthcheck:
get:
Expand Down
Loading