influxdata / influxdata/openapi

Stacks are not enumerated as a resource type

Open
#322 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
18
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Latest commit
```
commit d44c6511bf23ce09d14c82d0baa139d90f444469 (HEAD -> master, origin/master, origin/HEAD)
Author: Yoofi Quansah
Date: Fri Apr 29 08:57:53 2022 -0700
```

I'm preparing Grace tests for stacks. As a part of this I would like to test creating, updating and deleting stacks with valid and invalid user tokens. When creating a resource permission for an authorization related to stacks, I noticed that there is no 'stacks' item in the type enum in cloud.json.

in cloud.json `content > schemas > resource`

```json
"Resource": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"authorizations",
"buckets",
"dashboards",
"orgs",
"tasks",
"telegrafs",
"users",
"variables",
"secrets",
"labels",
"views",
"documents",
"notificationRules",
"notificationEndpoints",
"checks",
"dbrp",
"flows",
"annotations",
"functions"
]
},
"id": {
"type": "string",
"nullable": true,
"description": "If ID is set that is a permission for a specific resource. if it is not set it is a permission for all resources of that resource type."
},
"name": {
"type": "string",
"nullable": true,
"description": "Optional name of the resource if the resource has a name field."
},
"orgID": {
"type": "string",
"nullable": true,
"description": "If orgID is set that is a permission for all resources owned my that org. if it is not set it is a permission for all resources of that resource type."
},
"org": {
"type": "string",
"nullable": true,
"description": "Optional name of the organization of the organization with orgID."
}
}
}
```
Related Issue https://github.com/influxdata/idpe/issues/14584

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open cloud.json and inspect content > schemas > resource, specifically the Resource.type enum. Add the missing stacks resource type and verify that the OpenAPI schema accepts stack permissions alongside the existing resource types.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.