Skip to content

Document .json endpoint #722

Description

@slavashvets

I didn't find any mention in the documentation how can I do this simple thing.

We develop javascript browser-side application that should consume "final" json-config. Let me show in example:

Assume I create create files in Sping Cloud Config's git repository:

  • application.yml - General config for all applications
  • web.yml - Additional configuration for Web application
  • web-test.yml - Additional config for test profile

Actual behaviour

GET /config-server/web/test

Response:

{
  "name":"web",
  "profiles":[
    "test"
  ],
  "label":null,
  "version":null,
  "state":null,
  "propertySources":[
    {
      "name":"git@repo.git/web-test.yml",
      "source":{
        "param1":"patched"
      }
    },
    {
      "name":"git@repo.git/web.yml",
      "source":{
        "param2":"value2"
      }
    },
    {
      "name":"git@repo.git/application.yml",
      "source":{
        "param1":"value1"
      }
    }
  ]
}

Expected behaviour

GET /config-server/final/web/test

Response:

{
  "param1":"patched",
  "param2":"value2"
}

I have found similar question on StackOverflow.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions