Closed xaka closed 8 years ago
It seems that 0.8 is missing a lot of information. @svacas @KonstantinSviridov is this on purpose?
@sichvoge Actually, what we see here as "RAML 0.8" is output of the old JS parser. It provides exactly what was specified in RAML document, and it's fine.
"RAML 1.0" here is a fragment of TCK JSON. So, what's the additional information?
The RAML 1.0 parser provides a way to obtain AST node of referenced security scheme. The SecuritySchemeRef.securityScheme()
method serves this purpose. This functionality must be tested and, thus, reflected in TCK JSON. Right now we serialize AST Node completly, which is excessive, so, we need to invent some appropriate way. Serializing just security scheme name is obviously not enough.
One more difference between how securedBy
is serialized by the old 0.8 JS parser and TCK JSON is node format.
Current TCK JSON:
"securedBy": [
{ security scheme reference object 1 },
{ security scheme reference object 2 },
],
Old JS parser:
"securedBy": [
{
securitySchemeName1: { security scheme reference object }
} , {
securitySchemeName2: { security scheme reference object }
}
],
I do not see reasons for not switching TCK format to old JS 0.8 here.
RAML 0.8:
RAML 1.0: