raml-org / raml-spec

RAML Specification
http://raml.org
3.87k stars 858 forks source link

Define syntax for deep linking to elements within a RAML file #128

Open aldonline opened 9 years ago

aldonline commented 9 years ago

When writing Markdown documentation within a RAML document it should be possible to refer to elements. For example, the following is a documentation snippet from the Twitter API:

place_id:
  description: |
    A place in the world. These IDs can be retrieved from GET geo/reverse_geocode.

This is quite common.

I propose we define a syntax for linking to elements within a RAML spec. Documentation generators can then generate the appropriate links and named anchor tags to enable navigation where appropriate.

Links are not the only way to extract value from these annotations. Tooltips with contextual reference also become possible.

As an example, imagine if we could do the following:

place_id:
  description: |
    A place in the world. These IDs can be retrieved
    from [GET geo/reverse_geocode](#get/geo/reverse_geocode).

That's not too hard is it? And well worth the effort.

This is just to get the conversation started and put this out there before 1.0 is finalized. Here are other things to consider:

kylewelsby commented 9 months ago

Are there any workarounds for deep linking to other documents in RAML?