Skip to content

Conversation

@udamir
Copy link

@udamir udamir commented Mar 3, 2021

I don't want to put a specific url of server in OpenAPI file, as it can be used in different environments, so I use the following:

openapi: '3.0.2'
servers:
  - url: /api

On init method I get the error:

TypeError [ERR_INVALID_URL]: Invalid URL: /api
    at onParseError (internal/url.js:257:9)
    at new URL (internal/url.js:333:5)

@udamir udamir changed the title pathname vs server url (fix) Added fix for basic relative URLs and support variables in servers URLs Mar 4, 2021
@udamir
Copy link
Author

udamir commented Mar 4, 2021

This resolves #59

Copy link
Collaborator

@kobik kobik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the PR @udamir!

please see my comments

Move this improvement to next version
@udamir udamir requested a review from kobik March 18, 2021 13:26
@goldsziggy
Copy link

+1 on this fix

@kibertoad kibertoad closed this Mar 27, 2021
@kibertoad kibertoad reopened this Mar 27, 2021
@kibertoad
Copy link
Collaborator

CI is passing locally, merging.

@kibertoad
Copy link
Collaborator

@kobik Could you please merge this?

@kibertoad kibertoad closed this Mar 27, 2021
@kibertoad kibertoad reopened this Mar 27, 2021
@udamir
Copy link
Author

udamir commented Mar 27, 2021

What I need to do to pass ci/circleci checks?

@goldsziggy
Copy link

Bump on this change -- anything blocking it besides a review? I can add a commit if needed.

@kibertoad
Copy link
Collaborator

@udamir @goldsziggy This still needs tests, and also conflicts need to be resolved now that https://github.com/PayU/api-schema-builder/pull/67/files is merged, which I believe will be superseded by this PR - but you can definitely reuse the tests that were created for that PR.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants