You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
#%RAML 0.8
---
title: My Sample AppbaseUri: http://somwhere.really.cool/{version}/version: v1protocols: [HTTPS]mediaType: application/jsonresourceTypes:
- member:
usage: This resourceType should be used for any member of collection.get:
responses:
200:
body:
schema: <<resourcePathName | !singularize>>example: <<exampleGetResponse>>patch?:
body:
example: <<examplePatchRequest>>responses:
201:
headers:
location:
type: stringexample: /<<resourcePathName>>/1/organizations:
/{id}:
type:
member:
exampleGetResponse: !include examples/organizations/response-get.jsonexamplePatchRequest: !include examples/organizations/request-patch.jsonpatch:
When the YAML file generated and a JSON is produced, the media type is not present for the method patch for path /organizations/{id}. If I remove the ?, the application/json appears in the parsed content:
Honestly, I really do not know exactly what I did there but it changed the parsed result in a way that the bodies now contain the default media type from the main RAML document when none are specified in my optional resources.
The text was updated successfully, but these errors were encountered:
Hi there,
I think I discovered an issue.
Having the following:
When the YAML file generated and a JSON is produced, the media type is not present for the method
patch
for path/organizations/{id}
. If I remove the?
, the application/json appears in the parsed content:Incorrect
Correct
During my experimentation, I went to modify this file: https://github.com/raml-org/raml-js-parser/blob/master/src/resourceTypes.coffee#L54-L55
before
after
Honestly, I really do not know exactly what I did there but it changed the parsed result in a way that the bodies now contain the default media type from the main RAML document when none are specified in my optional resources.
The text was updated successfully, but these errors were encountered: