ManageIQ / ManageIQ/manageiq-api-client
Need to support keyword attributes in action calls
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 11
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
For the Automate usage, users call model methods with just the arguments as needed.
From the API server usage, we're expecting the json representation,
for example, in the model:
```
ar = AutomationRequest.find(15)
ar.authorized?(userid)
```
From the API server side, to expose authorized?, we'd take in a user reference or userid,
```
miq.automation_requests.find(15).authorized?(:userid => userid)
```
However, the expectation, is that the following would work:
```
miq.automation_requests.find(15).authorized?(userid)
```
The API Server needs to be able to expose keyword name list for method and when the client defined such actions, it would be able to check for hash signatures or otherwise treat them as an array of parameter. In the latter case, the Client would convert the array to the proper json to send up to the server.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by tracing how the Ruby client exposes and serializes action calls, then inspect the API server's method metadata for keyword names. Done means calls such as authorized?(userid) are accepted and converted to the expected JSON representation, while existing hash-style calls continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100