Skip to content

Emit warnings when unknown schemas are mapped to JsonElement #37

@halotukozak

Description

@halotukozak

Description

When SpecParser encounters a schema it cannot resolve, it maps it to TypeRef.Unknown, which becomes JsonElement in generated code. This happens silently — users have no way to know that part of their API lost type safety. The parser should emit a warning for each TypeRef.Unknown resolution so users can fix their spec or be aware of the limitation.

Acceptance criteria

  • SpecParser emits a Warning when a schema resolves to TypeRef.Unknown
  • Warning message includes the context (schema name, property name, or endpoint) where the unknown type was encountered
  • Warnings are surfaced in ParseResult.warnings
  • Tests verify warnings are emitted for unresolvable schemas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions