Skip to content

Use functional patterns when parsing Open API source #58

@AlexanderAllen

Description

@AlexanderAllen

Panettone is currently not powerful enough to infer and generate the type information for array items, and probably more advanced OpenAPI use cases (read: very nested structures).

Therefore when an array type is encountered in the OAS spec the generated value objects for PHP simply contain an array() as the type. This means you don't know what kind of information is contained in the array. This is the kind of challenge I set out to work on with this project.

I am trying to see if by incorporating FantasyLand (functional) patterns I can grant the parsing logic in Panettone the power to output more type-complete value objects.

All the action is happening in the test/Unit space.

From the July 2024 roadmap

  • Assert laws for any new category object implemented.
  • PHPStan information for any new objects. Types for objects or methods that currently lack types..
  • Fix PHPStan compilation for upstream Fantasy Land interfaces.
  • Aliases that bridge Cretterand's and Habryn (Fantasy Land) implementations.
  • Re-assert stan dumps correct types for every new category object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions