spec-first/connexion

Allow passing of a Specification object to AbstractApp.add_api

Open

#1.260 geöffnet am 26. Juni 2020

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (738 Forks)batch import
enhancementgood first issue

Repository-Metriken

Stars
 (4.346 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Description

Right now you can pass either a file path to a JSON swagger spec, or a parsed dictionary of one.

Expected behaviour

It would be nice if you could pass in a Specification object, since they can be quite expensive to create even from a dictionary - as much as 10s for ours! Enabling this could speed up startup times for large apps, as well as aid in testing where apps are created over and over.

Actual behaviour

It doesn't do allow this :) People instead monkeypatch (eg. https://github.com/zalando/connexion/issues/306#issuecomment-584258868) to work around this which is never ideal.

Contributor Guide