Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Fix: additionalProperties #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tehcyx
Copy link
Contributor

@tehcyx tehcyx commented Nov 11, 2016

Hi,

We, a team from SAP working on API Hub and YaaS, started using this converter to convert our RAML definitions into Swagger. We found that some of our RAML files were failing to convert so we had to make some changes, and we wanted to share these changes with you. We collected the list of changes we made in this CHANGELOG and will provide each fix as a different pull request for you so that you can pick the ones that you want to support.

The issue to fix
'additionalProperties' are not supported by Swagger 2.0 and therefor break conversion.

The fix
Resolve 'additionalProperties' to object.

Best regards,
Daniel Roth - SAP Hybris

var path = result.path;

var parent = jp.value(schema, jp.stringify(_.dropRight(path)));
delete parent['additionalProperties'];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tehcyx How about replacing it with x-additionalProperties?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as in the other PR, works for us, we just didn't need it for the use-case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants