elements
elements copied to clipboard
Investigate if we allow to pass incorrect http operation data to Request Samples
Summary
Story
When working on https://github.com/stoplightio/elements/pull/1687 I wanted to add a test. In Elements, I opened a project that had a big response example (Public APIs/Bitbucket API/Get a respository diffstat). Using React dev tools I extracted httpOperation from ResponseExamples component. This httpOperation is expected to be of type IHttpOperation.
When I pasted the value to VSCode though as following:
import { IHttpOperation } from '@stoplight/types';
export const httpOperation: IHttpOperation =
{
here goes the httpOperation value extracted using devtools
}
I started getting type errors:

Because of that, the response examples is not generated properly. At the same time, the response schema itself is rendered properly in Docs.
Tasks
- [ ] Find the source of a problem. Possible:
http-spec,Elementstypings?,Elementsfunction for generating response examples - [ ] Code the fix