Now id field is hardcoded in API spec
|
@property |
|
def param_id(self) -> dict: |
|
return { |
|
"in": "path", |
|
"name": "id", |
|
"required": True, |
|
"type": "integer", |
|
"format": "int32", |
|
} |
we can allow defining primary key field on the ResourceDetail subclass and check it
(for get here, and other references for param_id:)
|
if issubclass(resource, ResourceDetail): |
get field from schema by name, create spec for it
why:
support such paths as /api/person/<string:public_id>/ where public_id is unique/pk
Now id field is hardcoded in API spec
combojsonapi/combojsonapi/spec/plugin.py
Lines 136 to 144 in 9816284
we can allow defining primary key field on the
ResourceDetailsubclass and check it(for get here, and other references for
param_id:)combojsonapi/combojsonapi/spec/plugin.py
Line 307 in 9816284
get field from schema by name, create spec for it
why:
support such paths as
/api/person/<string:public_id>/wherepublic_idis unique/pk