desec-stack
desec-stack copied to clipboard
wip(api): OpenAPI schema, closes #359
Todos:
- [ ] The
NonBulkOnlyDefaultthat we use forRRsetSerializer.subnameis not serializable. As a consequence, JSON schema generation crashes, and YML schema generation produces a broken file. (The schema file included in this PR was generated with this default removed.) @nils-wisiol, do you have any idea what to do about this? - [ ] Some adaptions in the views were necessary because the views usually assume presence of
self.requestorself.domain, which is not guaranteed in the way the schema generator instantiates the views. Let's take a look whether the fixes can be done in a better way. - [ ] Remove
/api/v2/? - [ ] Come up with a way of publishing the schema automatically. How? (Via Django? Or generate a static file and check it into
webapp/? Something else?)
AuthenticatedActionView.action was renamed to AuthenticatedActionView.auth_action because .action is used by DRF ViewSet, and it seems that the schema generator mistakenly assumes certain things about .action as if AuthenticatedActionView was a ViewSet (but it's not). The problem went away by using another name.
closed accidentally during master branch rename
Blocked indefinitely (see https://github.com/desec-io/desec-stack/issues/359#issuecomment-2078997545), closing.