feat: expose description and content on the entity API (kernel 0.2.4) #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/entity-description-api"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Bumps the pin to
==0.2.4and exposesdescriptionandcontenton the entity API.0.2.3 restored the columns. 0.2.4 gave
EntityRegistryService.registerparameters forthem. This is the last hop:
POST /entitiescan now send them andGET /entitiesreturns them. Until now only raw SQL could reach the fields, so haskydocs could write a
description this API could neither set nor show.
Optional on the way in, always present on the way out
EntityRegister.descriptionand.contentarestr | None = None.EntityResponsedeclares themstr, because the columns are NOT NULL.registeris an upsert and haskydocs writesdescriptionby raw SQL onentity_type='document'rows. If omitting the field meant"", every rename throughthis endpoint would blank what the stage app stored.
Nonemeans "no opinion".The earlier fix went the wrong way
This file's own docstring records it:
POST /entitiesused to pass adescriptionkwarg, that was found to be a 500, and it was fixed by deleting the kwarg — reading the
reduced model as correct. smeos has the column and haskydocs writes it, so the model
was the regression. The docstring is corrected here rather than left to mislead the
next reader.
Tests
Three added to
test_api_smoke.py, against a real database:POSTand back out of the response"", notnullVerification