You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
I've encountered this problem when using raml2html. Including traits from external files causes some spurious parsing errors. The raml2html repository directs parsing errors here.
Here's an example. Running $ raml2html - v on this file produces no errors:
#%RAML 1.0
title: My API
version: 0.1
mediaType: application/json
traits:
resource_listing_head:
responses:
200:
body:
type: string
uuid_validator:
usage: Apply this to any resource which includes a uuid.
description: |
If the uuid-space in the URI does not contain a valid uuid,
return 400 and a useful error message.
responses:
400:
body:
type: error
example:
description: Malformed URI
debug: "AFISH is not a valid UUID"
types:
error:
description: A type containing an error message.
properties:
description:
type: string
description: Human-readable message describing the problem.
debug:
type: string
description: |
Machine-supplied information which might help
the recipient solve the problem.
Whereas including the traits from external files and validating results in this error:
Api contains errors.
UNKNOWN_NODE: Unknown node: '200' (resource_listing_head.raml:3:1)
ERROR_IN_INCLUDED_FILE: Error in the included file: Unknown node: '200' (TestA
PI.raml:7:3)
INVALID_PROPERTY_USAGE: RAML 1.0 does not allow using 'type' property within tra
its (resource_listing_head.raml:5:3)
ERROR_IN_INCLUDED_FILE: Error in the included file: RAML 1.0 does not allow us
ing 'type' property within traits (TestAPI.raml:7:3)
Here is the API and the traits:
#%RAML 1.0
title: My API
version: 0.1
mediaType: application/json
traits:
resource_listing_head: !include resource_listing_head.raml
uuid_validator: !include uuid_validator.raml
#%RAML 1.0 Trait
usage: Apply this to any resource which includes a uuid.
description: |
If the uuid-space in the URI does not contain a valid uuid,
return 400 and a useful error message.
responses:
400:
body:
type: error
example:
description: Malformed URI
debug: "AFISH is not a valid UUID"
The text was updated successfully, but these errors were encountered:
I've encountered this problem when using raml2html. Including traits from external files causes some spurious parsing errors. The raml2html repository directs parsing errors here.
Here's an example. Running
$ raml2html - v
on this file produces no errors:Whereas including the traits from external files and validating results in this error:
Here is the API and the traits:
resource_listing_head.raml:
uuid_validator.raml:
The text was updated successfully, but these errors were encountered: