Skip to content

Disallow extends for request types. #4152

Open
@flobernd

Description

@flobernd

🚀 Feature Proposal

Disallow extends for request types.

Motivation

The body of requests is specified using the body property. Allowing requests to derive from a non-empty base class creates a complex problem as we basically introduce multiple-inheritance (we would have to merge properties of the base class and the body property).

The current base types of all requests (e.g. RequestBase) are empty. They are exclusively used to propagate behaviors like CommonRequestParameters to the final request types.

In the future, requests should never use extends, but only implements (to directly specify the behaviors).

Action Items

  • Replace all Request extends SomeRequestBase with Request implements AllBehaviorsOfSomeRequestBase
  • Remove Request.base_type and all related handling from metamodel.ts and the compiler in general
  • Add validation to disallow extends on request types (cc @pquentin )

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions