Skip to content

Commit b6cf631

Browse files
committed
update
1 parent 10fda3e commit b6cf631

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

openapi.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,11 +991,14 @@ components:
991991

992992

993993
WasmPluginConfiguration:
994+
description: "The wasm plugin configuration"
994995
type: object
995996
properties:
996997
file:
998+
description: "The file path to the wasm file."
997999
type: string
9981000
envs:
1001+
description: "Environments that can be used in wasm."
9991002
type: object
10001003
additionalProperties:
10011004
type: string
@@ -1004,33 +1007,40 @@ components:
10041007
- file
10051008

10061009
FunctionPluginConfiguration:
1010+
description: "The function plugin configuration"
10071011
type: object
10081012
properties:
10091013
function:
1014+
description: "The function content."
10101015
type: string
10111016
maxLength: 1048576
10121017
required:
10131018
- function
10141019

10151020
WebhookxSignaturePluginConfiguration:
1021+
description: "The webhookx-signature plugin configuration"
10161022
type: object
10171023
properties:
10181024
signing_secret:
1025+
description: "The signature secret."
10191026
type: string
10201027
minLength: 1
10211028

10221029
JsonschemaValidatorPluginConfiguration:
1030+
description: "The jsonschema-validator plugin configuration"
10231031
type: object
10241032
properties:
10251033
draft:
10261034
type: string
10271035
enum: ["6"]
10281036
default: "6"
10291037
default_schema:
1038+
description: "The default schema"
10301039
type: string
10311040
format: jsonschema
10321041
maxLength: 1048576
10331042
schemas:
1043+
description: "Defines event's schema."
10341044
type: object
10351045
additionalProperties:
10361046
type: object

pkg/openapi/openapi.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,9 @@ func insertError(current map[string]interface{}, i int, paths []string, err *ope
140140
if isIndex {
141141
ensureArray(current, "", index)
142142
arr := current[""].([]interface{})
143-
if err.Origin == nil {
144-
arr[index] = formatError(err)
145-
}
143+
arr[index] = formatError(err)
146144
} else {
147-
//if err.Origin == nil { // TODO???
148145
current[key] = formatError(err)
149-
//}
150146
}
151147
return
152148
}

test/fixtures/plugins/hello/hello_plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var schemaJSON = `
2020
`
2121

2222
type Config struct {
23-
Message string `json:"message" validate:"required"`
23+
Message string `json:"message"`
2424
}
2525

2626
func (c Config) Schema() *openapi3.Schema {

0 commit comments

Comments
 (0)