MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / CommitDoc

Method CommitDoc

service/api-doc/iml.go:139–152  ·  view source on GitHub ↗
(ctx context.Context, serviceId string, data *Doc)

Source from the content-addressed store, hash-verified

137}
138
139func (i *imlAPIDocService) CommitDoc(ctx context.Context, serviceId string, data *Doc) error {
140 doc, err := NewDocLoader(data.Content)
141 if err != nil {
142 return err
143 }
144 if err := doc.Valid(); err != nil {
145 return err
146 }
147
148 return i.commitService.Save(ctx, serviceId, &DocCommit{
149 Content: data.Content,
150 APICount: doc.APICount(),
151 })
152}

Callers

nothing calls this directly

Calls 4

ValidMethod · 0.95
APICountMethod · 0.95
NewDocLoaderFunction · 0.85
SaveMethod · 0.65

Tested by

no test coverage detected