We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04c04ef commit b24bc3aCopy full SHA for b24bc3a
pkg/stack/types.go
@@ -147,6 +147,10 @@ type Stack struct {
147
}
148
149
func (s *Stack) SetApiDoc(name string, doc *openapi3.T) {
150
+ if s.apiDocs == nil {
151
+ s.apiDocs = make(map[string]*openapi3.T)
152
+ }
153
+
154
s.apiDocs[name] = doc
155
156
@@ -188,6 +192,10 @@ func FromFile(name string) (*Stack, error) {
188
192
if doc, err := openapi3.NewLoader().LoadFromFile(filepath.Join(stack.dir, v)); err != nil {
189
193
return nil, err
190
194
} else {
195
+ if stack.apiDocs == nil {
196
+ stack.apiDocs = make(map[string]*openapi3.T)
197
198
191
199
stack.apiDocs[k] = doc
200
201
0 commit comments