Skip to content

Commit 59aef16

Browse files
authored
fix: Validate spec only when connection is established (#1223)
Documentation generation will fail otherwise. Follow-up for #1214
1 parent 2725ed5 commit 59aef16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ func (p *Plugin) Init(ctx context.Context, spec []byte, options NewClientOptions
141141
defer p.mu.Unlock()
142142
var err error
143143

144-
if p.schemaValidator != nil {
144+
if !options.NoConnection && p.schemaValidator != nil {
145145
var v any
146146
if err := json.Unmarshal(spec, &v); err != nil {
147147
return fmt.Errorf("failed to unmarshal plugin spec: %w", err)

0 commit comments

Comments
 (0)