diff --git a/src/lib/code-sample/schema.ts b/src/lib/code-sample/schema.ts index 6819b19..3f38d55 100644 --- a/src/lib/code-sample/schema.ts +++ b/src/lib/code-sample/schema.ts @@ -85,7 +85,7 @@ export const createCodeSample = async ( request: createJavascriptRequest(codeSampleDefinition, context), response: createJavascriptResponse(codeSampleDefinition, context), request_syntax: 'javascript', - response_syntax: 'javascript', + response_syntax: 'json', }, python: { title: 'Python', diff --git a/test/snapshots/blueprint.test.ts.md b/test/snapshots/blueprint.test.ts.md index 26ca1ee..4c7d587 100644 --- a/test/snapshots/blueprint.test.ts.md +++ b/test/snapshots/blueprint.test.ts.md @@ -135,7 +135,7 @@ Generated by [AVA](https://avajs.dev). request: 'await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})', request_syntax: 'javascript', response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -225,7 +225,7 @@ Generated by [AVA](https://avajs.dev). request: 'await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})', request_syntax: 'javascript', response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -315,7 +315,7 @@ Generated by [AVA](https://avajs.dev). request: 'await seam.foos.list()', request_syntax: 'javascript', response: '[{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]', - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -405,7 +405,7 @@ Generated by [AVA](https://avajs.dev). request: 'await seam.foos.list()', request_syntax: 'javascript', response: '[{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]', - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -495,7 +495,7 @@ Generated by [AVA](https://avajs.dev). request: 'await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})', request_syntax: 'javascript', response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -585,7 +585,7 @@ Generated by [AVA](https://avajs.dev). request: 'await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})', request_syntax: 'javascript', response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -675,7 +675,7 @@ Generated by [AVA](https://avajs.dev). request: 'await seam.foos.list()', request_syntax: 'javascript', response: '[{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]', - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -765,7 +765,7 @@ Generated by [AVA](https://avajs.dev). request: 'await seam.foos.list()', request_syntax: 'javascript', response: '[{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]', - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -855,7 +855,7 @@ Generated by [AVA](https://avajs.dev). request: 'await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})', request_syntax: 'javascript', response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -945,7 +945,7 @@ Generated by [AVA](https://avajs.dev). request: 'await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})', request_syntax: 'javascript', response: '{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}', - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -1035,7 +1035,7 @@ Generated by [AVA](https://avajs.dev). request: 'await seam.foos.list()', request_syntax: 'javascript', response: '[{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]', - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -1125,7 +1125,7 @@ Generated by [AVA](https://avajs.dev). request: 'await seam.foos.list()', request_syntax: 'javascript', response: '[{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]', - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -1225,7 +1225,7 @@ Generated by [AVA](https://avajs.dev). request: 'await seam.transport.air.planes.list()', request_syntax: 'javascript', response: '[{"plane_id":"9d3163f9-9185-40d3-a0ce-a03d3c7ce402","name":"Woosh"}]', - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -1306,7 +1306,7 @@ Generated by [AVA](https://avajs.dev). request: 'await seam.transport.air.planes.list()', request_syntax: 'javascript', response: '[{"plane_id":"9d3163f9-9185-40d3-a0ce-a03d3c7ce402","name":"Woosh"}]', - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -1387,7 +1387,7 @@ Generated by [AVA](https://avajs.dev). request: 'await seam.transport.air.planes.list()', request_syntax: 'javascript', response: '[{"plane_id":"9d3163f9-9185-40d3-a0ce-a03d3c7ce402","name":"Woosh"}]', - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -1482,7 +1482,7 @@ Generated by [AVA](https://avajs.dev). request: 'await seam.deprecated.undocumented.endpoint()', request_syntax: 'javascript', response: 'void', - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -1554,7 +1554,7 @@ Generated by [AVA](https://avajs.dev). request: 'await seam.deprecated.undocumented.endpoint()', request_syntax: 'javascript', response: 'void', - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -1626,7 +1626,7 @@ Generated by [AVA](https://avajs.dev). request: 'await seam.deprecated.undocumented.endpoint()', request_syntax: 'javascript', response: 'void', - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -1837,9 +1837,9 @@ Generated by [AVA](https://avajs.dev). request: `// javascript␊ await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})`, request_syntax: 'javascript', - response: `// javascript␊ + response: `// json␊ {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -1937,9 +1937,9 @@ Generated by [AVA](https://avajs.dev). request: `// javascript␊ await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})`, request_syntax: 'javascript', - response: `// javascript␊ + response: `// json␊ {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -2037,9 +2037,9 @@ Generated by [AVA](https://avajs.dev). request: `// javascript␊ await seam.foos.list()`, request_syntax: 'javascript', - response: `// javascript␊ + response: `// json␊ [{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]`, - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -2137,9 +2137,9 @@ Generated by [AVA](https://avajs.dev). request: `// javascript␊ await seam.foos.list()`, request_syntax: 'javascript', - response: `// javascript␊ + response: `// json␊ [{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]`, - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -2237,9 +2237,9 @@ Generated by [AVA](https://avajs.dev). request: `// javascript␊ await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})`, request_syntax: 'javascript', - response: `// javascript␊ + response: `// json␊ {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -2337,9 +2337,9 @@ Generated by [AVA](https://avajs.dev). request: `// javascript␊ await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})`, request_syntax: 'javascript', - response: `// javascript␊ + response: `// json␊ {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -2437,9 +2437,9 @@ Generated by [AVA](https://avajs.dev). request: `// javascript␊ await seam.foos.list()`, request_syntax: 'javascript', - response: `// javascript␊ + response: `// json␊ [{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]`, - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -2537,9 +2537,9 @@ Generated by [AVA](https://avajs.dev). request: `// javascript␊ await seam.foos.list()`, request_syntax: 'javascript', - response: `// javascript␊ + response: `// json␊ [{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]`, - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -2637,9 +2637,9 @@ Generated by [AVA](https://avajs.dev). request: `// javascript␊ await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})`, request_syntax: 'javascript', - response: `// javascript␊ + response: `// json␊ {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -2737,9 +2737,9 @@ Generated by [AVA](https://avajs.dev). request: `// javascript␊ await seam.foos.get({"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33"})`, request_syntax: 'javascript', - response: `// javascript␊ + response: `// json␊ {"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}`, - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -2837,9 +2837,9 @@ Generated by [AVA](https://avajs.dev). request: `// javascript␊ await seam.foos.list()`, request_syntax: 'javascript', - response: `// javascript␊ + response: `// json␊ [{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]`, - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -2937,9 +2937,9 @@ Generated by [AVA](https://avajs.dev). request: `// javascript␊ await seam.foos.list()`, request_syntax: 'javascript', - response: `// javascript␊ + response: `// json␊ [{"foo_id":"8d7e0b3a-b889-49a7-9164-4b71a0506a33","name":"Best foo","nullable_prop":null,"number_prop":10,"object_prop":{"foo":"bar"},"array_prop":["foo","bar"]}]`, - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -3047,9 +3047,9 @@ Generated by [AVA](https://avajs.dev). request: `// javascript␊ await seam.transport.air.planes.list()`, request_syntax: 'javascript', - response: `// javascript␊ + response: `// json␊ [{"plane_id":"9d3163f9-9185-40d3-a0ce-a03d3c7ce402","name":"Woosh"}]`, - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -3138,9 +3138,9 @@ Generated by [AVA](https://avajs.dev). request: `// javascript␊ await seam.transport.air.planes.list()`, request_syntax: 'javascript', - response: `// javascript␊ + response: `// json␊ [{"plane_id":"9d3163f9-9185-40d3-a0ce-a03d3c7ce402","name":"Woosh"}]`, - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -3229,9 +3229,9 @@ Generated by [AVA](https://avajs.dev). request: `// javascript␊ await seam.transport.air.planes.list()`, request_syntax: 'javascript', - response: `// javascript␊ + response: `// json␊ [{"plane_id":"9d3163f9-9185-40d3-a0ce-a03d3c7ce402","name":"Woosh"}]`, - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -3334,9 +3334,9 @@ Generated by [AVA](https://avajs.dev). request: `// javascript␊ await seam.deprecated.undocumented.endpoint()`, request_syntax: 'javascript', - response: `// javascript␊ + response: `// json␊ void`, - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -3416,9 +3416,9 @@ Generated by [AVA](https://avajs.dev). request: `// javascript␊ await seam.deprecated.undocumented.endpoint()`, request_syntax: 'javascript', - response: `// javascript␊ + response: `// json␊ void`, - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { @@ -3498,9 +3498,9 @@ Generated by [AVA](https://avajs.dev). request: `// javascript␊ await seam.deprecated.undocumented.endpoint()`, request_syntax: 'javascript', - response: `// javascript␊ + response: `// json␊ void`, - response_syntax: 'javascript', + response_syntax: 'json', title: 'JavaScript', }, php: { diff --git a/test/snapshots/blueprint.test.ts.snap b/test/snapshots/blueprint.test.ts.snap index ce53be3..449d493 100644 Binary files a/test/snapshots/blueprint.test.ts.snap and b/test/snapshots/blueprint.test.ts.snap differ