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

Type library breaks parsing #21

Open
DefaultUser1606 opened this issue Mar 11, 2024 · 0 comments
Open

Type library breaks parsing #21

DefaultUser1606 opened this issue Mar 11, 2024 · 0 comments

Comments

@DefaultUser1606
Copy link

If I reference a library in a raml file, the parser breaks with an error below
`Invalid cast from 'System.String' to 'System.Collections.Generic.IDictionary``

Raml example:

#%RAML 1.0
baseUri: https://www.redacted.com/
title: test
version: v1
mediaType: application/json
securedBy: [openIdConnect, null]
uses:
  libtype: typelibrary.raml
			
types:
  MyLibraryType: libtype.MyLibraryType

Library example:

#%RAML 1.0 Library
usage: usage desc
types:
# Base types MUST BE defined first
  MyLibraryType:
    type: object
    properties: 
      channelId: 
        type: string
        required: true
        pattern: "^[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}$"
      name: 
        type: string
        required: true
        maxLength: 100

This happens both in ConvertToOpenApiDocument and in ConvertToFile methods.

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

1 participant