PK!7 iistarlette_apispec/__init__.pyfrom .schemas import APISpecSchemaGenerator __all__ = ["APISpecSchemaGenerator"] __version__ = "1.0.2" PK!starlette_apispec/schemas.pyimport typing from starlette.routing import BaseRoute from starlette.schemas import BaseSchemaGenerator def make_plain_datastructure(data: dict) -> dict: """ Some of the children of the dict might have specialized datatypes. """ if isinstance(data, list): return [make_plain_datastructure(item) for item in data] elif isinstance(data, dict): return {key: make_plain_datastructure(value) for key, value in data.items()} return data class APISpecSchemaGenerator(BaseSchemaGenerator): def __init__(self, spec: typing.Type) -> None: self.spec = spec def get_schema(self, routes: typing.List[BaseRoute]) -> dict: endpoints = self.get_endpoints(routes) for endpoint in endpoints: self.spec.path( path=endpoint.path, operations={endpoint.http_method: self.parse_docstring(endpoint.func)}, ) return make_plain_datastructure(self.spec.to_dict()) PK!- n)starlette_apispec-1.0.2.dist-info/LICENSEBSD 3-Clause License Copyright (c) 2018, Santiago All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PK!Hu)GTU'starlette_apispec-1.0.2.dist-info/WHEEL HM K-*ϳR03rOK-J,/R(O-)$qzd&Y)r$UV&UrPK!HSP?*starlette_apispec-1.0.2.dist-info/METADATAX[o~`՗da˹{adw{PlmZKl(R%);B~Xr٢(P?>el?І+3Pc`- YM! 'itzYk[mN0X&k3F1IC0:\=Aav9<^ ?BU:2UHٲ8M&MIY͸zDžT%2.pNnq[-G%3(}=>_^}怋\ J - zО赴 #$8%l@.ٓ$nfteZmP5(hTn\tV iFuy3*,M{&ƩTu?WӘnA%TݍH.C@<:s?Ǐ岢`pbW/{DvqNcr &< NEhXBl'D(>WDq3CSi3o"2>W#ن7;c `vh~˙҅ TP9ۮTW:~2M?PE(^TݭWq ɗm޴^L(b. =4>dϲbSUaLúa"&*;Xslm`*\:U Xkehic1IʄPFC;4yegY&xXfi ;TX;5 oAJt MǭjؔJ){,x~K3Qo'Phnȹ+\^9/L;;iǞ>y "֘E9ҧVsyռmae0.5^[жȀquy(y 2_L3T*4 驮]M.Yu]EM;}vr!ׁ mUiߓd%#U)JE{}27yPÈw=6@҃oI]}3MUhrqԭ;h(bĊس'&TG@=`P5Q :j'!66qշABG9CaG^޽+dZ!vvkWP eP.iV4Mb/ M H^`!*$ dپ  Y6/fkh>PZGCșO'!O,W.~gr咜fy5r0D滄|\RG:R B3r{M*:Z{֔lA ^ %MZtHT{ X#$bR^KV$>.+Vq-j?yJ(?PK!H4(starlette_apispec-1.0.2.dist-info/RECORDIr@} -Ȃ'bDtgeU |GY$:ق0BaN$\g^\.)sHߦ2Js:T@}AiV1K n^sm:n&cB ǾP{*ZQ_MN^2u 3L)rنbptF:v5| Brȴh9:t96I].m][ ߦ@Cg3}Y,qoބTz1xLo8W9E8PjXw?|PK!7 iistarlette_apispec/__init__.pyPK!starlette_apispec/schemas.pyPK!- n)starlette_apispec-1.0.2.dist-info/LICENSEPK!Hu)GTU' starlette_apispec-1.0.2.dist-info/WHEELPK!HSP?*t starlette_apispec-1.0.2.dist-info/METADATAPK!H4(starlette_apispec-1.0.2.dist-info/RECORDPK