Replies: 1 comment
-
Devs answer: it's because the openapi models follow the specification, they're not meant to be extended I'm closing the discussion |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello guys,
I've been working with api version 3.1 for a while now which uses a nomenclature like this:
As you can see, I always use, for my query parameters, deepObjects which will be sent to an internal code which will generate the queries for the database.
From the code snippet above, I looked for a simplified way by creating a personal
Model\Parameter
which already contains some properties likestyle
,explode
,schema
etin
. It would have prevented me from copy pasting the same code in each entity (these properties are always the same in all of myMetadata\GetCollection
parameters and in each entities).However, it seems like all
Model
are marked asfinal
which makes my idea unfeasible.I tried to create my own
Model\DeepObjectParameter
, identical toModel\Parameter
, with the same getters/setters, without success (it does not seem to be recognized by openai).So I was wondering why all these Model (Response, Parameter ...) were marked as
final
?Is this mandatory for api-platform/core ?
Isn't there a way to remove
final
and rely on an interface (considering thatfinal
was there to force a "type") ?Thanks.
Beta Was this translation helpful? Give feedback.
All reactions