swagger-ui-action icon indicating copy to clipboard operation
swagger-ui-action copied to clipboard

Needs to copy yaml files manually if openapi.yaml is not placed at the repository root

Open watanabe-pfr opened this issue 1 year ago • 1 comments

Thank you for providing a great tool.

Please support the relative path based on the position of openapi.yaml .

If the openapi.yaml is not placed at the repository root, like below, the deployed pages cannot access to the parts directory with relative path.

.
├── interface
│   ├── README.md
│   └── v1
│       ├── openapi.yaml
│       └── parts
│           ├── part1.yaml
│           ├── part2.yaml
│           └── part3.yaml
└── README.md

It can be resolved with manual copy:

- name: Copy OpenAPI files
        run: |
          mkdir -p swagger-ui/parts
          cp interface/v1/openapi.yaml swagger-ui/
          cp interface/v1/parts/*.yaml swagger-ui/parts/

It'll be more intuitive if the build output is generated based on the path of openapi.yaml Thank you.

watanabe-pfr avatar Jul 22 '24 10:07 watanabe-pfr

I think the problem here is that currently only the openapi.yaml file is copied automatically. Other files must be manually copied to the correct place in the generated swagger ui output.

Legion2 avatar Jul 22 '24 11:07 Legion2