raml-org / raml-tck

Test Compatibility Kit for RAML 1.0
http://raml-org.github.io/raml-tck/
8 stars 10 forks source link

Removing calculated display names for everything except parameters and types #3

Closed KonstantinSviridov closed 8 years ago

sichvoge commented 8 years ago

Why did you remove all displayName nodes now?

KonstantinSviridov commented 8 years ago

As for calculating displayNames, RAML 0.8 spec only says about parameters. In order to be consistent wth it (well, I do not have other sources for calculation rules now) I removed all the calculated displayNames except for Parameters and TypeDeclarations (as they may play role of parameters).

sichvoge commented 8 years ago

Actually wen havedisplayName not only on parameters and type declarations, but also on resources for example. Can you please speak to @petrochenko-pavel-a about that and make a list of nodes that have displayName that we can go through and confirm?

KonstantinSviridov commented 8 years ago

As for disaplayNames of something but parameters an type declarations, they are not calculated until we approve some rules for it. But they are not prevented from being serialized into TCK JSON.

Here is an example of resource displayName: https://github.com/mulesoft-labs/raml-tck/blob/master/Examples/RAML10/Overlays%20001/apigateway.raml#L14 https://github.com/mulesoft-labs/raml-tck/blob/master/Examples/RAML10/Overlays%20001/apigateway-tck.json#L726

sichvoge commented 8 years ago

Are you also taking defaults into account? For example, in resources the displayName gets default to the resource name as described in the spec. @svacas, I believe these cases needs to be represented into the resulting JSON as well right?

KonstantinSviridov commented 8 years ago

No. That's because I did not consider the RAML 0.8 spec saying it enough clearly. And I totally forgot that RAML 1.0 spec says it explisitly.

I'll switch it on.