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

Metadata fields aren't shown as optional parameters. #3

Open
dawn-stripe opened this issue Apr 13, 2021 · 2 comments
Open

Metadata fields aren't shown as optional parameters. #3

dawn-stripe opened this issue Apr 13, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@dawn-stripe
Copy link
Contributor

dawn-stripe commented Apr 13, 2021

There is a bug right now where metadata fields on POST requests aren't getting transformed into optional parameters on the request within the collection. Right now we have a workaround documented in the README.md

@dawn-stripe dawn-stripe self-assigned this Apr 13, 2021
@dawn-stripe dawn-stripe added the bug Something isn't working label Apr 13, 2021
@dawn-stripe
Copy link
Contributor Author

Our metadata fields are defined like this:

W/in the requestBody we have the field encoded as a deepObject:

"encoding": {
  "metadata": {
    "explode": true,
    "style": "deepObject"
  }
}

W/in the schema for the request we have the property with as 'anyOf' like this:

"metadata": {
 "anyOf": [
   {
     "additionalProperties": {
       "type": "string"
     },
     "type": "object"
   },
   {
     "enum": [
       ""
     ],
     "type": "string"
   }
 ],
 "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`."
},

@dawn-stripe
Copy link
Contributor Author

filed issue with converter project

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