def test_openapi_extra():
    "Test adding extra attribute to the schema"
    api = NinjaAPI(
        openapi_extra={
            "externalDocs": {
                "description": "Find more info here",
                "url": "https://example.com",
            }
        },
        version="1.0.0",
    )
    schema = api.get_openapi_schema()

    assert schema == {
        "openapi": "3.1.0",
        "info": {"title": "NinjaAPI", "version": "1.0.0", "description": ""},
        "paths": {},
        "components": {"schemas": {}},
        "servers": [],
        "externalDocs": {
            "description": "Find more info here",
            "url": "https://example.com",
        },
    }
Test adding extra attribute to the schema
tests/test_openapi_extra.py