Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

policy association joi.alternatives causing issue with swagger docs #522

Closed
cianfoley-nearform opened this issue Apr 17, 2018 · 1 comment
Assignees

Comments

@cianfoley-nearform
Copy link
Contributor

Suggest that we remove the alternatives for associating a policy

Currently we can associate a policy with user/team/org with a string id or object (string, variables) as array elements in the payload

If using a string it results in the association being created with empty policy instance variables anyway.

Suggest we enforce just the object elements in the array for associating policies; an empty variables array is effectively then the same as the string id alternative currently in place.

A major reason to do this is swagger does not like joi.alternatives when generating the docs so it adds a little confusion to that endpoint. This would simplify, however it would be a breaking change.

@cianfoley-nearform
Copy link
Contributor Author

merged :-)

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

No branches or pull requests

1 participant