diff --git a/raml-parser-2/src/main/java/org/raml/v2/internal/impl/commons/grammar/BaseRamlGrammar.java b/raml-parser-2/src/main/java/org/raml/v2/internal/impl/commons/grammar/BaseRamlGrammar.java index 7776cce5..749f2124 100644 --- a/raml-parser-2/src/main/java/org/raml/v2/internal/impl/commons/grammar/BaseRamlGrammar.java +++ b/raml-parser-2/src/main/java/org/raml/v2/internal/impl/commons/grammar/BaseRamlGrammar.java @@ -759,6 +759,6 @@ protected Rule protocols() protected Rule responseCodes() { - return range(Range.closed(100L, 599L)); + return range(Range.closed(0L, 999L)); } } diff --git a/raml-parser-2/src/test/resources/org/raml/v2/parser/custom-http-status-codes/input.raml b/raml-parser-2/src/test/resources/org/raml/v2/parser/custom-http-status-codes/input.raml new file mode 100644 index 00000000..81bbcb73 --- /dev/null +++ b/raml-parser-2/src/test/resources/org/raml/v2/parser/custom-http-status-codes/input.raml @@ -0,0 +1,7 @@ +#%RAML 1.0 +title: My API +/resource: + get: + responses: + 0: + 999: diff --git a/raml-parser-2/src/test/resources/org/raml/v2/parser/custom-http-status-codes/output.txt b/raml-parser-2/src/test/resources/org/raml/v2/parser/custom-http-status-codes/output.txt new file mode 100644 index 00000000..c76a2794 --- /dev/null +++ b/raml-parser-2/src/test/resources/org/raml/v2/parser/custom-http-status-codes/output.txt @@ -0,0 +1,34 @@ +RamlDocumentNode (Start: 11 , End: 78, On: input.raml, Source: SYObjectNode) + KeyValueNodeImpl (Start: 11 , End: 24, On: input.raml) + SYStringNode: "title" (Start: 11 , End: 16, On: input.raml) + OverlayableObjectNodeImpl (Start: 18 , End: 24, On: input.raml, Source: SYStringNode) + KeyValueNodeImpl (Start: 11 , End: 24, On: input.raml) + StringNodeImpl: "value" (Start: -1 , End: -1) + OverlayableStringNode: "My API" (Start: 18 , End: 24, On: input.raml) + ResourceNode (Start: 25 , End: 78, On: input.raml, Source: KeyValueNodeImpl) + SYStringNode: "/resource" (Start: 25 , End: 34, On: input.raml) + SYObjectNode (Start: 38 , End: 78, On: input.raml) + MethodNode (Start: 38 , End: 78, On: input.raml, Source: KeyValueNodeImpl) + SYStringNode: "get" (Start: 38 , End: 41, On: input.raml) + SYObjectNode (Start: 47 , End: 78, On: input.raml) + KeyValueNodeImpl (Start: 47 , End: 78, On: input.raml) + SYStringNode: "responses" (Start: 47 , End: 56, On: input.raml) + SYObjectNode (Start: 64 , End: 78, On: input.raml) + ResponseNode (Start: 64 , End: 66, On: input.raml, Source: KeyValueNodeImpl) + SYIntegerNode: 0 (Start: 64 , End: 65, On: input.raml) + SYNullNode (Start: 66 , End: 66, On: input.raml) + ResponseNode (Start: 73 , End: 77, On: input.raml, Source: KeyValueNodeImpl) + SYIntegerNode: 999 (Start: 73 , End: 76, On: input.raml) + SYNullNode (Start: 77 , End: 77, On: input.raml) + KeyValueNodeImpl (Start: -1 , End: -1) + StringNodeImpl: "displayName" (Start: -1 , End: -1) + ObjectNodeImpl (Start: -1 , End: -1) + KeyValueNodeImpl (Start: -1 , End: -1) + StringNodeImpl: "value" (Start: -1 , End: -1) + OverlayableStringNode: "get" (Start: -1 , End: -1, Source: SYStringNode) + KeyValueNodeImpl (Start: -1 , End: -1) + StringNodeImpl: "displayName" (Start: -1 , End: -1) + ObjectNodeImpl (Start: -1 , End: -1) + KeyValueNodeImpl (Start: -1 , End: -1) + StringNodeImpl: "value" (Start: -1 , End: -1) + OverlayableStringNode: "/resource" (Start: -1 , End: -1, Source: SYStringNode)