Skip to content

YAML error indicator #2780

@rrayst

Description

@rrayst

examples/security/basic-auth/simple/apis.yaml contains

# yaml-language-server: $schema=https://www.membrane-api.io/v7.0.6.json
api:
  port: 2000
  flow:
    - basicAuthentication:
        users:
          - username: alice
            password: membrane
          - username: bob
            password: membrane2025
  target:
    url: https://api.predic8.de
---
...

Because of refactoring the example test fails with

14:08:53,709 ERROR RouterCLI:178 - Invalid field 'username' in User
Config:
  api:
    port: 2000
    flow:
    - basicAuthentication:
        users:
>         username: "alice"
          password: "membrane"
        - username: "bob"
          password: "membrane2025"
    target:
      url: "https://api.predic8.de"
Membrane terminated with exit code 1

But the error messages misses the - in front of username in the line marked as wrong (>).

Metadata

Metadata

Assignees

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