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

[feature] capability to set Host and port , and even basePath #70

Closed
LasneF opened this issue Mar 29, 2024 · 5 comments
Closed

[feature] capability to set Host and port , and even basePath #70

LasneF opened this issue Mar 29, 2024 · 5 comments
Assignees

Comments

@LasneF
Copy link

LasneF commented Mar 29, 2024

Hello

given than an OAS spec can be used in various implementation ( dev , uat, prod)
the server section is not always accurate

it would be great to be able to override the setting with a command like this

offat -f .\openapi.yml https://myHost:myPort/myPath

notice it is not as same as setting a proxy

this use case it taken into consideration for tooling such as prism or vaccum

@dmdhrumilmistry
Copy link
Collaborator

dmdhrumilmistry commented Apr 4, 2024

Hello

given than an OAS spec can be used in various implementation ( dev , uat, prod) the server section is not always accurate

it would be great to be able to override the setting with a command like this

offat -f .\openapi.yml https://myHost:myPort/myPath

notice it is not as same as setting a proxy

this use case it taken into consideration for tooling such as prism or vaccum

Hi @LasneF,

would below option work for you?

offat -f openapi.yml --server https://host:port/path

if server flag is not provided then it'll expect value to be present in the OAS file.

Let me know if I'm interpreting this incorrectly along with few reference links.

@LasneF
Copy link
Author

LasneF commented Apr 4, 2024

this would make the deal yes , then is it by default , is it --host , or server , you are the boss :)

@dmdhrumilmistry
Copy link
Collaborator

this would make the deal yes , then is it by default , is it --host , or server , you are the boss :)

It'll be server flag

@dmdhrumilmistry
Copy link
Collaborator

this feature has been released in latest version of offat 0.17.0.

you can bump to latest version using

python -m pip install -U offat

replace python with python3 if required

@LasneF
Copy link
Author

LasneF commented Apr 8, 2024

Tested and validated , it works like a charm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants