-
Notifications
You must be signed in to change notification settings - Fork 1
/
info.go
34 lines (30 loc) · 1.01 KB
/
info.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright (c) 2017 Opsidian Ltd.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package openapi
import (
"github.com/conflowio/conflow/src/conflow"
"github.com/conflowio/conflow/src/conflow/block"
)
// @block "configuration"
type Info struct {
// @required
Title string `json:"title"`
Summary string `json:"summary,omitempty"`
Description string `json:"description,omitempty"`
TermsOfService string `json:"termsOfService,omitempty"`
Contact *Contact `json:"contact,omitempty"`
License *License `json:"license,omitempty"`
// @required
Version string `json:"version,omitempty"`
}
func (i *Info) ParseContextOverride() conflow.ParseContextOverride {
return conflow.ParseContextOverride{
BlockTransformerRegistry: block.InterpreterRegistry{
"contact": ContactInterpreter{},
"license": LicenseInterpreter{},
},
}
}