Skip to content

Latest commit

 

History

History
125 lines (87 loc) · 6.22 KB

embedded-examples-error-resolution.md

File metadata and controls

125 lines (87 loc) · 6.22 KB

how did I locally resolved error in Operation-Object.json?

1st change

change line 219 in the document itself from

"$ref": "/components/messages/userSignedUp"

to

"$ref": "#/components/messages/userSignedUp"

2nd change

and similar changes for line 231 in the document

from

"$ref": "/components/messages/userSignedUpReply"
"$ref": "#/components/messages/userSignedUpReply"

3rd change

remove lines from 217 to 221 in the document

Then the file becomes valid in the AsyncAPI Studio

Try it here

how did I locally resolved error in Message-Example-Object.json?

Added a placeholder of type array for the example at line 429 in the base doc

"examples":[]

applied it via this commit

how did I locally resolved error in Operation-Traits-Object.json?

Added a placeholder of type array for the example at line 231 in the base doc

"traits":[]

applied it via this commit


Warning in Security Scheme OAuth Flow Object-json-format: "0" property must have required property "in"
Warning in Security Scheme OAuth Flow Object-json-format: "0" property must not be valid
Warning in Security Scheme OAuth Flow Object-json-format: "0" property must have required property "scheme"
Warning in Security Scheme OAuth Flow Object-json-format: "0" property must have required property "name"
Warning in Security Scheme OAuth Flow Object-json-format: "0" property must have required property "openIdConnectUrl"
Warning in Security Scheme OAuth Flow Object-json-format: Property "flows" is not expected to be here
Warning in Security Scheme OAuth Flow Object-json-format: "clientCredentials" property must not be valid
Warning in Security Scheme OAuth Flow Object-json-format: Property "scopes" is not expected to be here
Warning in Security Scheme OAuth Flow Object-json-format: Property "flows" is not expected to be here
Warning in Security Scheme OAuth Flow Object-json-format: "clientCredentials" property must not be valid
Warning in Security Scheme OAuth Flow Object-json-format: Property "scopes" is not expected to be here
Warning in Security Scheme OAuth Flow Object-json-format: "0" property must have required property "in"
Warning in Security Scheme OAuth Flow Object-json-format: "0" property must not be valid
Warning in Security Scheme OAuth Flow Object-json-format: "0" property must have required property "scheme"
Warning in Security Scheme OAuth Flow Object-json-format: "0" property must have required property "name"
Warning in Security Scheme OAuth Flow Object-json-format: "0" property must have required property "openIdConnectUrl"
Warning in Security Scheme OAuth Flow Object-json-format: "oauth" property must have required property "in"
Warning in Security Scheme OAuth Flow Object-json-format: "oauth" property must not be valid
Warning in Security Scheme OAuth Flow Object-json-format: "oauth" property must have required property "scheme"
Warning in Security Scheme OAuth Flow Object-json-format: "oauth" property must have required property "name"
Warning in Security Scheme OAuth Flow Object-json-format: "oauth" property must have required property "openIdConnectUrl"
Warning in Security Scheme OAuth Flow Object-json-format: Property "flows" is not expected to be here
Warning in Security Scheme OAuth Flow Object-json-format: "clientCredentials" property must not be valid
Warning in Security Scheme OAuth Flow Object-json-format: Property "scopes" is not expected to be here

Solution for this error

For the resolution, what I found out from my observation is that if we remove this line:

"authorizationUrl": "https://example.com/api/oauth/dialog",

from the examples in the spec, the files become valid.

and we remove the same line from the yaml file as well.

I tried removing this line from the invalid document in the Studio validator and the file became valid

Maybe I'm wrong and we need to modify something else? I don't know as of now...


Problems in Message-Object

Warning in Message Object-json-format: ENOENT: no such file or directory, open 'path/to/user-create.avsc'

Problems in Components-Object

Warning in Components Object-json-format: "AvroExample" property must match "then" schema
Warning in Components Object-json-format: "schema" property must match exactly one schema in oneOf
Warning in Components Object-json-format: ENOENT: no such file or directory, open 'path/to/user-create.avsc'

As far as I understand, it's referencing to some non-existent external example file.

I've tried this in the Studio validator:

  • For the Message Object, if we remove this portion, the file becomes valid.

  • For the Components Object, if we remove this portion, the file becomes valid.