Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow extends for request types. #4152

Open
3 tasks
flobernd opened this issue Mar 27, 2025 · 0 comments
Open
3 tasks

Disallow extends for request types. #4152

flobernd opened this issue Mar 27, 2025 · 0 comments

Comments

@flobernd
Copy link
Member

flobernd commented Mar 27, 2025

🚀 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 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant