Skip to content
This repository was archived by the owner on Sep 14, 2022. It is now read-only.

swagger.api.host default value #224

Description

@MarmaladeSky

Hello everyone!
The context of this issue/question is Play 2.7 -> 2.8 upgrade with swagger-play2 1.7.1 to the latest 2.0.1-SNAPSHOT.

TL;DR: #225

I noticed that the conditions of the host property generation had changed.
At 1.7.1:
If swagger.api.host is defined, take it overwise try to resolve via requestHeader.host that will return an empty string in a "worst" case.
At 2.0.1-SNAPSHOT:
Just take swagger.api.host, the default value is defined as localhost:9000.

As a result, I have to put in all my Play-based apps (that are running at multiple different hosts and handle swagger in-place) this thing:

swagger.api.host=""
or
swagger.api.host="${MAGIC_VARIABLE_THAT_KNOWS_THE_HOST}"

that looks pretty ugly and hurts my sense of beauty every time I see the configuration :D

I don't understand the reason to have this kind of default value. If the idea is to provide the simplest workable solution at default Play in the local environment, how about having an empty string or return the previous logic?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions