Skip to content

Endpoint files: an unknown top-level key (e.g. a mis-named auth include) passes validation silently #282

Backlog

Description

@jrosskopf

A section include keeps the section's own name as the key (src/extended_yaml_parser.cpp:625-640). A shared file with auth-prod: included as {{include:auth-prod from common.yaml}} gives the endpoint an auth-prod: key nothing reads, and no auth:.

--validate-config passes with no warning, and with no top-level auth: the endpoint answers 200 to anonymous callers. The flapi.io docs had this exact example (fixed in DataZooDE/flapi-landingpage#7).

The main config warns about unknown top-level keys; endpoint files should too, at least for the near-miss auth-* / *auth* names, or every unknown key.

Also found in the same review: completion/complete returns total = every enum value scanned instead of the number of matches, e.g. total: 5 for one match (src/mcp_route_handlers.cpp:2596-2607).

Found while reviewing the task guides (#272).

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