elements icon indicating copy to clipboard operation
elements copied to clipboard

Incorrect use of externalValue for examples

Open philsturgeon opened this issue 4 years ago • 1 comments

Currently we use value and externalValue interchangeably. As far as I can tell, unless http-spec is doing something special, this is never correct behavior.

https://github.com/stoplightio/elements/pull/1426/files/cbae54f41958a061af027a2c98ec302e31e94306#diff-d62fc4b88048fb2b331dfd75cc53f0ca684d25303b206512e2550f0c00ac1c32R33

externalValue is a URI to a file. If we wanted to support externalValue we would need to follow the URI, see if we understand the file, and return the data (which is already going to be JSON or similar).

Or we can ignore externalValue for examples, but we cannot use them interchangeably with value.

Originally posted by @philsturgeon in https://github.com/stoplightio/elements/pull/1426#discussion_r656068132

philsturgeon avatar Jun 23 '21 13:06 philsturgeon

So what is the decision here? Do we want to resolve external value or just ignore it?

mallachari avatar Aug 13 '21 07:08 mallachari