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

[openapi2kong] Server Port only supports up to 32767 #104

Closed
danielpoonwj opened this issue Nov 6, 2023 · 3 comments
Closed

[openapi2kong] Server Port only supports up to 32767 #104

danielpoonwj opened this issue Nov 6, 2023 · 3 comments

Comments

@danielpoonwj
Copy link
Contributor

danielpoonwj commented Nov 6, 2023

Hi,

If we use a value larger than 32767 as the port in the url under servers, the service port gets set to 32767. We should be able to specify ports up to 65535.

openapi

servers:
  - url: 'http://127.0.0.1:50000'

generated decK state

services:
  - port: 32767
...

It seems that it's because of this line in code:

service["port"], _ = strconv.ParseInt(targets[0].Port(), 10, 16)

Setting bit size to 16 doesn't support any higher port numbers. There's actually an error that is returned but that is ignored.

@Tieske
Copy link
Member

Tieske commented Nov 6, 2023

a PR would be most welcome :)

@rspurgeon
Copy link
Contributor

Hi,

If we use a value larger than 32767 as the port in the url under servers, the service port gets set to 32767. We should be able to specify ports up to 65535.

@danielpoonwj thank you for filing this issue. We will prioritize a fix for this.

@Tieske
Copy link
Member

Tieske commented Nov 28, 2023

Fixed in 0.1.24

@Tieske Tieske closed this as completed Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants