Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parser fails when using oneOf #11

Closed
rmelian opened this issue Aug 13, 2019 · 3 comments
Closed

parser fails when using oneOf #11

rmelian opened this issue Aug 13, 2019 · 3 comments

Comments

@rmelian
Copy link
Contributor

rmelian commented Aug 13, 2019

The following example fails:

asyncapi: '2.0.0-rc1'
id: 'urn:hello-world-oneOf'
info:
  title: Hello world oneOf application
  version: '0.1.0'
channels:
  hello:
    publish:
      message:
        oneOf:
          - $ref: '#/components/messages/hello-msg1'
          - $ref: '#/components/messages/hello-msg2'          
        
components:
  messages:
    hello-msg1:
      payload:
        type: string
        pattern: '^hello .+$' 
    hello-msg2:
      payload:
        type: string        

with error

Error: Unexpected token u in JSON at position 0
      at Object.parse (lib/parser.js:72:11)
@fmvilas
Copy link
Member

fmvilas commented Aug 14, 2019

Uhm! Weird. Are you sure it's just when using oneOf? Or is it happening always?

@rmelian
Copy link
Contributor Author

rmelian commented Aug 14, 2019

only oneOf failing, you can see an example here #13

@fmvilas
Copy link
Member

fmvilas commented Aug 14, 2019

Copying here the comment that I left on the PR:

Not sure what the problem is but I just tested it on the #12 branch and it's not failing anymore. Thanks for this PR anyway 👍

@fmvilas fmvilas closed this as completed Aug 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants