Closed alangibson-philips closed 6 years ago
Glad you figured it out.
[EDIT2] And the content-type is suddenly correct. May be experiencing some lag between the editor and the mock server.
Remember to save your document before using the mock server. Since you can use the mock server from the console in the live preview it could be out of sync and be a little confusing. The mock server only goes by the saved state.
[EDIT] It works as expected when you actually use the right mime type. It's "application/vnd.api+json" not "application/vnd.json+api". Although, the mock server responds with "content-type: application/json", so it might be getting it right by accident.
[EDIT2] And the content-type is suddenly correct. May be experiencing some lag between the editor and the mock server.
Is there any way to get Apiary to generate response body from Response Attributes when content type is application/vnd.api+json?
Apairy never generates a response body with the following definition, neither in the documentation nor in the mock server. It works fine with
Response 200 (application/json)
.Data Structures
Profile
ProfileResponse
/Profile/00000000-0000-0000-0000-000000000000
(required)ProfileResource
00000000-0000-0000-0000-000000000000
(required)Profile
(required)/Profile/00000000-0000-0000-0000-000000000000
(required)It seems to have worked in these cases: https://github.com/apiaryio/api-blueprint/issues/195 https://github.com/apiaryio/api-blueprint/issues/380