Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to upload v1/resource/{resource_type_name} #383

Open
amarjandu opened this issue Dec 20, 2019 · 2 comments
Open

unable to upload v1/resource/{resource_type_name} #383

amarjandu opened this issue Dec 20, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@amarjandu
Copy link
Contributor

I believe the regex used to verify the resource_type_name is verified against the wrong schema...
I'm unable to call the command
hca auth post-v1-resource --resource-type-name dss:project

Within the YAML:

    resource_type_name:
      name: resource_type_name
      in: path
      required: true
      description: The name of a type of resources to which a resource policy can be applied.
      schema:
        $ref: '#/components/schemas/custom_identifier'

i think the ref should change to
$ref: '#/components/schemas/resource_name'

But i could be mistaken // not using the api correctly.

@amarjandu amarjandu added the bug Something isn't working label Dec 20, 2019
@amarjandu
Copy link
Contributor Author

Related to this issue, if i try to name the resource_type to = projects I end up with,

{
  "detail": "'string' does not match '[A-z]\\\\w*[^\\\\W_]:[A-z]\\\\w*[^\\\\W_]'",
  "status": 400,
  "title": "Bad Request",
  "type": "about:blank"
}

I don't see this regex string within the repository, the closest thing seems to be policy_action

pattern: '[A-z]\w*[^\W_]:[A-z]\w*[^\W_]'

@amarjandu
Copy link
Contributor Author

The swagger page, shows a policy document present within the default json object that is sent up with the request. Upon removing the owner_policy object, the request was created/handled correctly..

$ref: '#/components/schemas/policy_document'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant