|
I recently had an unexpected match in for an openAPIOperation directive in my portman-config, which includes the following: overwrites:
- openApiOperation: "*::/*/{id}"
overwriteRequestPathVariables:
- key: id
value: '{{<tag>Id}}'
overwrite: trueIn my API spec I have defined a compound API path that does not include an id path parameter as follows: /plaid_accounts/fetch:
post:
tags:
- plaid_accounts
summary: Trigger Fetch from Plaid
operationId: triggerPlaidAccountFetch
parameters:
- name: start_date
in: query
schema:
type: string
format: date
- name: end_date
in: query
schema:
type: string
format: date
- name: plaid_account_id
in: query
schema:
type: integerWhen I run portman with this config, it is generate a request with an id path parameter: I was able to correct this by updating my config as follows: overwrites:
- openApiOperation: "*::/*/{id}"
excludeForOperations:
- "POST::/plaid_accounts/fetch"
overwriteRequestPathVariables:
- key: id
value: '{{<tag>Id}}'
overwrite: trueBut I hadn't expected the OpenApiOperation value ":://{id}" to match a path without the "{id}" at the end. This is likely a case of me not understanding the pattern-matching rules, but in case this seems odd to the portman team, I've also attached a simplified spec and config |
Answered by
thim81
Nov 1, 2024
Replies: 1 comment 2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


FYI @jpjpjp This is now part of version 1.30.5 of Portman, so be sure to update.