Skip to content

Evaluate replacing custom OpenAPI parser with established library #46

@petersalomonsen

Description

@petersalomonsen

Context

We currently use a custom OpenAPI parser implementation to generate TypeScript types and Zod schemas from the NEAR OpenAPI specification. Recent issues (like duplicate schema generation) raise the question of whether we should use an established library instead.

Current Issues

  • Maintenance burden when OpenAPI spec changes
  • Edge cases like duplicate schema names require manual fixes
  • Limited support for complex OpenAPI features (oneOf, anyOf, allOf)

Documentation

See OPENAPI_PARSER_EVALUATION.md for detailed analysis of pros/cons.

Recommendation

For now, keep the custom implementation but improve error handling and test coverage. Consider a hybrid approach in the future if maintenance becomes problematic.

Related Context

  • Recent fix for duplicate GenesisConfigRequest schema generation
  • NEAR-specific requirements: snake_case to camelCase conversion
  • Need for both TypeScript types and Zod schemas for runtime validation

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions