Skip to content

Automate reference doc creation for stable API permissions #10937

Closed

Description

@jhtimmins

Description
We should find a way to create automated documentation of required permissions for stable API endpoints.

Use case / motivation

Right now the process of documenting which permissions are needed for which API endpoints is entirely manual, which is error prone and likely to get out of date.

Activity

  1. changed the title [-]Automate doc creation for stable API permissions[/-] [+]Automate reference doc creation for stable API permissions[/+] on Sep 14, 2020
  2. added
    kind:taskA task that needs to be completed as part of a larger issue
    and removed on Apr 2, 2021
  3. MarkI2 commented on Mar 5, 2024

    @MarkI2

    Hi I'm looking to make my first contribution to airflow. Can I take a look at this ticket?

  4. potiuk commented on Mar 5, 2024

    @potiuk
    Member

    Sure. Assigned you.

  5. potiuk commented on Mar 2, 2026

    @potiuk
    Member

    @MarkI2 We are unassigning you from this issue as part of our updated assignment policy.

    This is not meant to discourage your contribution — quite the opposite! You are still very welcome to work on this issue and submit a PR for it. Simply comment that you are working on it and open a PR when ready.

    We found that formal assignments were not working well, as they often prevented others from contributing when the assignee was not actively working on the issue.

  6. durgaprasadml commented on May 27, 2026

    @durgaprasadml
    Contributor

    Hi! I’ve been exploring the FastAPI permission system and the documentation pipeline in Airflow.

    My current approach is to:

    • introspect FastAPI APIRoute dependencies for /api/v2/*
    • extract permission metadata from requires_access_* dependency functions
    • generate an auto-generated RST reference page for endpoint permissions
    • integrate generation through a prek script similar to generate_openapi_spec

    At the moment I’m leaning toward generating a standalone RST page instead of modifying the OpenAPI YAML directly, since it keeps the implementation smaller and avoids adding additional noise to the generated spec.

    I’m also exploring whether attaching structured permission metadata directly in security.py would be cleaner and more maintainable than relying purely on introspection.

    I’d appreciate any feedback before I start implementing the extractor and doc generation flow.

  7. potiuk commented on May 27, 2026

    @potiuk
    Member

    Yes. That looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions