desec-stack icon indicating copy to clipboard operation
desec-stack copied to clipboard

wip(api): OpenAPI schema, closes #359

Open peterthomassen opened this issue 5 years ago • 1 comments

Todos:

  • [ ] The NonBulkOnlyDefault that we use for RRsetSerializer.subname is 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.request or self.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.

peterthomassen avatar May 02 '20 16:05 peterthomassen

closed accidentally during master branch rename

peterthomassen avatar Apr 14 '21 11:04 peterthomassen

Blocked indefinitely (see https://github.com/desec-io/desec-stack/issues/359#issuecomment-2078997545), closing.

peterthomassen avatar Apr 29 '24 14:04 peterthomassen