Open tim-lai opened 2 years ago
@char0n @tim-lai
This is because we don't have metadata for ref key (it's just a string), and mechanism is based on metadata.
we can solve this either :
or
reference-value-key
or something, this would not work for languages/format where such keys are named differently than $ref
; this is not something we have at the moment though.In terms of "right way" I'd say Option 1 maybe better (you'd probably be quicker to add these changes to reference elements in namespaes), but no strong objection at this stage to go for the non-metadata Option 2
Please let me know what you think
@frantuma, right 1.) is systematic solution so let's go for it.
Here is how the metadata will look like after this issue is processed:
Symbolic Expression representation:
ReferenceElement // classes: [reference-element]
MemberElement
key=$ref // classes: [reference-key]
value=<abtirary> // classes: [reference-value]
Classes reference-element
and reference-value
are already present. The scope of this issue is to add the reference-key
class metadata.
Q&A (please complete the following information)
$ref
Content & configuration
use fixtures on editor-next.swagger.io. e.g. any of OpenAPI 3.0 Petstore Fixture, AsyncAPI 2.5 Streetlights Fixture, OpenAPI 3.1 Fixture
Describe the bug you're encountering
Display of semantic highlighting for
$ref
is not working. Applies to various possible Reference Object locations. In the dark theme,$ref
currently appears as grey.To reproduce...
Steps to reproduce the behavior:
$ref
Expected behavior
The
$ref
key should be non-grey color. Currently expecting "orange-ish", but could also have fontStyle: "bold" and/or be a different color.Screenshots
Additional context or thoughts