You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to post a problem I've met when I use Portman to generate the multi-file OAS.
They are all defined under the same path, i.e.
├── A.yaml
├── B.yaml
├── C.yaml
Portman config file not provided.
ResolverError: Error opening file "/Users/my.name/documents/tmp/converted/schemas/B.yaml"
ENOENT: no such file or directory, open '/Users/my.name/documents/tmp/converted/schemas/B.yaml'
I saw someone posted a similar question, and the answer said Portman will de-reference before doing the converting, but here the problem is obvisouly the rootOAS A.yaml got convert Before dereferencing other OAS.
One workaround I've made it work is change the reference path from A to B:
$ref: "../../B.yaml#/components/schemas/action"
It works but not really seems to be correct to me.
Any help will be appreciated, thanks!
The text was updated successfully, but these errors were encountered:
cw112233
changed the title
$ref does not quite work as expected
$ref to other OAS file does not quite work as expected
Jan 24, 2024
We will have to replicate the 3 references to see where de-reference goes wrong. It is a bit strange that Portman is looking for the referenced file in the "tmp" folder.
We just release v1.30.3, which has improvements for handling $ref in multiple files.
Can you give the latest version a spin and see if it overcomes the reported issues?
Hi there!
I want to post a problem I've met when I use Portman to generate the multi-file OAS.
They are all defined under the same path, i.e.
├── A.yaml
├── B.yaml
├── C.yaml
Firstly, I have rootOAS A.yaml:
As you can see, the rootOAS refers to B schema
B.yaml
Which internally refers to C Schmea
C.yaml
Then when I tried to generate collection with portman command feeding the rootOAS
portman -l ./A.yaml --cliOptionsFile ./portman/configs/portman-cli.json -o ./definitions/postman.json
I got error:
I saw someone posted a similar question, and the answer said Portman will de-reference before doing the converting, but here the problem is obvisouly the rootOAS A.yaml got convert Before dereferencing other OAS.
One workaround I've made it work is change the reference path from A to B:
$ref: "../../B.yaml#/components/schemas/action"
It works but not really seems to be correct to me.
Any help will be appreciated, thanks!
The text was updated successfully, but these errors were encountered: