oficina / docs Public

Clone
git clone https://amadan.net/oficina/docs

Plain git — no account needed to clone.

Download

Download this file

1// Command docs-contract exports the live delegated operation schemas.
2package main
3
4import (
5 "encoding/json"
6 "fmt"
7 "github.com/carlosframework/docs/internal/docs"
8 "os"
9)
10
11func main() {
12 operations, err := docs.AgentContracts()
13 if err != nil {
14 fmt.Fprintln(os.Stderr, "Could not export Docs operation contracts.")
15 os.Exit(1)
16 }
17 encoder := json.NewEncoder(os.Stdout)
18 encoder.SetIndent("", " ")
19 if encoder.Encode(operations) != nil {
20 os.Exit(1)
21 }
22}
23