Open gmaggess opened 10 years ago
Hi @gmaggess, I would log this issue in @raml-org/raml-js-parser.
This is expected behaviour. The idea is that consumers of the RAML specification do not need to know if in the definition the name or the schema were used.
However, they might want to know for various reasons, such as documentation. It would probably be good to add such metadata in parallel with the metadata about resourceType and trait names.
Let's please file the issue and responses under the specific parser implementations. But it's also good to have here an issue as a candidate for the next version of the RAML spec, asking that the spec recommend (not mandate) that RAML processors preserve information about the names of schemas. On Jul 2, 2014 4:33 AM, "Damian Martinez Gelabert" notifications@github.com wrote:
Hi @gmaggess https://github.com/gmaggess, I would log this issue in @raml-org/raml-js-parser.
This is expected behaviour. The idea is that consumers of the RAML specification do not need to know if in the definition the name or the schema were used.
— Reply to this email directly or view it on GitHub https://github.com/raml-org/raml-spec/issues/52#issuecomment-47765133.
I think that this would over complicate the parser's output: Adding metadata. This is just one possible source of metadata. There are a hundred more, and putting all of that into the output, would be just too much (IMHO).
In developing the parser we tried as much as possible to remove RAML manipulation in consumers, trying to get it to process as much as it can.
@usarid and @dmartinezg, in my use case I pull the raml file from the server, parse it and populate my RAML based service designer. Therefore, I want to be able to reverse engineer the same raml file that I sent early to the server. Does that make sense?
Hi there,
When parsing a raml file, whose body response references a previously defined schema (sample below)
the returned js literal, does not contain the schema name anymore, instead it replaces the name by the json schema value, as if it was an inline schema from the beginning.
Is there a way to change this behavior and have the parser return the schema name?
Cheers, George