+
    Q(i                        R t ^ RIHtHtHtHt ^ RIHtHtH	t	H
t
HtHtHtHt ^ RIHt ^ RIHt ^ RIH	t ^ RIH
t ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHtHt ^ RIHt ^RIHtHtH t H!t!H"t"H#t# ^RI$H%t%H&t& ]! ]'4      t(]! R]]4      t)]! R]]4      t*]! R]]4      t+]! R]	]4      t,]! R]]4      t-]! R]]4      t.]! R]]4      t/]! R]
]4      t0R R lt1 ! R R]])]+]*],]-].]/]03,          4      t2RR.t3R# )zHOpenAPI parsing logic for converting OpenAPI specs to HTTPRoute objects.)AnyGenericTypeVarcast)OpenAPI	Operation	ParameterPathItem	ReferenceRequestBodyResponseSchema)r   )r   )r   )r	   )r
   )r   )r   )r   )	BaseModelValidationError)
get_logger)	HTTPRoute
JsonSchemaParameterInfoParameterLocationRequestBodyInfoResponseInfo)_combine_schemas_and_map_params_replace_ref_with_defsTOpenAPITSchema
TReference
TParameterTRequestBody	TResponse
TOperation	TPathItemc                h    V ^8  d   QhR\         \        \        3,          R\        \        ,          /# )   openapi_dictreturn)dictstrr   listr   )formats   "f/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/fastmcp/utilities/openapi/parser.py__annotate__r*   7   s*     3L 3LtCH~ 3L$y/ 3L    c                   V P                  RR4      p VP                  R4      '       dx   \        P                  ! V 4      p\        P                  RVP                   24       \        V\        \        \        \        \        \        \        V4	      pVP                  4       # \         P                  ! V 4      p\        P                  RVP                   24       \        V\"        \$        \&        \(        \*        \,        \.        V4	      pVP                  4       #   \0         dU   p\        P3                  RT 24       TP5                  4       p\        P3                  RT 24       \7        RT 24      ThR	p?ii ; i)
z
Parses an OpenAPI schema dictionary into a list of HTTPRoute objects
using the openapi-pydantic library.

Supports both OpenAPI 3.0.x and 3.1.x versions.
openapi z3.0z0Successfully parsed OpenAPI 3.0 schema version: z0Successfully parsed OpenAPI 3.1 schema version: z"OpenAPI schema validation failed: zValidation errors: zInvalid OpenAPI schema: N)get
startswith
OpenAPI_30model_validateloggerdebugr-   OpenAPIParserReference_30	Schema_30Parameter_30RequestBody_30Response_30Operation_30PathItem_30parser   r
   r   r   r   r   r   r	   r   errorerrors
ValueError)r#   openapi_version
openapi_30parser
openapi_31eerror_detailss   &      r)   parse_openapi_to_http_routesrG   7   sM    #&&y"5O)L%%e,,#22<@JLLB:CUCUBVW #
F <<>! !//=JLLB:CUCUBVW #
F <<>! L9!=>
*=/:;3M?CD!K	Ls%   D A6D "A6D E8$AE33E8c                     a  ] tR t^mt o RtV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR	 ltRV 3R lR llt	V 3R lR lt
V 3R lR ltV 3R lR ltV 3R lR ltRV 3R lR lltV 3R lR ltV 3R lR ltV 3R lR ltRtV tR
# ) r5   z[Unified parser for OpenAPI schemas with generic type parameters to handle both 3.0 and 3.1.c                   < V ^8  d   QhRS[ RS[S[,          RS[S[,          RS[S[,          RS[S[,          RS[S[,          RS[S[,          RS[S[,          R	S[	/	# )
r"   r-   reference_cls
schema_clsparameter_clsrequest_body_clsresponse_clsoperation_clspath_item_clsrA   )
r   typer   r   r   r   r   r   r    r&   )r(   __classdict__s   "r)   r*   OpenAPIParser.__annotate__{   s     / // J'/ M	/
 J'/ |,/ 9o/ J'/ I/ /r+   c
                r    Wn         W n        W0n        W@n        WPn        W`n        Wpn        Wn        Wn        R# )z?Initialize the parser with the OpenAPI schema and type classes.N)	r-   rJ   rK   rL   rM   rN   rO   rP   rA   )
selfr-   rJ   rK   rL   rM   rN   rO   rP   rA   s
   &&&&&&&&&&r)   __init__OpenAPIParser.__init__{   s8     *$* 0(**.r+   c                &   < V ^8  d   QhRS[ RS[/# )r"   param_inr$   )r&   r   )r(   rR   s   "r)   r*   rS      s     0 0s 0?P 0r+   c                    VR9   d   \        \        V4      # \        P                  RV R24       \        \        R4      # )z@Convert string parameter location to our ParameterLocation type.queryzUnknown parameter location: z, defaulting to 'query')pathr[   headercookie)r   r   r3   warning)rU   rY   s   &&r)   _convert_to_parameter_location,OpenAPIParser._convert_to_parameter_location   s>    <<)8445hZ?VWX%w//r+   c                &   < V ^8  d   QhRS[ RS[ /# )r"   itemr$   )r   )r(   rR   s   "r)   r*   rS      s     5 5 5 5r+   c                   \        WP                  4      '       Ed   VP                  p\        V\        4      '       g   V#  VP	                  R4      '       g   \        RV 24      hVP                  R4      P                  R4      pV P                  pV EFM  pVP                  4       '       d*   \        V\        4      '       d   V\        V4      ,          pM\        V\        4      '       d   WTP                  P                  9   d   \        WER4      pMVP                   '       d%   WTP                   9   d   VP                   V,          pMVR8X  d    \#        VR4      '       d   VP$                  pM[\#        WE4      '       d   \        WER4      pM=RpM:\        V\&        4      '       d   VP)                  V4      pM\        RV RV R24      hVe   EK>  \        R	V R
V R24      h	  \        W@P                  4      '       d   V P+                  V4      # V# V#   \,        \.        \0        \2        \
        3 d   p\        RT RT 24      ThRp?ii ; i)z.Resolves a reference to its target definition.z#/z/External or non-local reference not supported: /N
componentszCannot traverse part 'z' in reference ''zReference part 'z' not found in path 'zFailed to resolve reference '': )
isinstancerJ   refr&   r0   r@   stripsplitr-   isdigitr'   intr   	__class__model_fieldsgetattrmodel_extrahasattrrf   r%   r/   _resolve_refAttributeErrorKeyError
IndexError	TypeError)rU   rc   ref_strpartstargetpartrE   s   &&     r)   rt   OpenAPIParser._resolve_ref   s   d..//hhGgs++,Y))$//$I'S   d+11#6!D||~~*VT*B*B!'D	!2#FI66#3#3#@#@@%,V4%@F#///D<N<N4N%+%7%7%=F  $|38U8U)/):):!(!6!6)0t)D)-#FD11!'D!1(4TF:J7)STU  ~(.tf4I'RST 3 "< f&8&899,,V44  #Hj)ZP Y #@	QC!PQWXXYs2   H CH 'B&H ?H H  I7I		Ic                &   < V ^8  d   QhRS[ RS[/# )r"   
schema_objr$   )r   r   )r(   rR   s   "r)   r*   rS      s      # * r+   c                    V P                  V4      p\        W P                  4      '       d   VP                  RRRR7      pM=\        V\        4      '       d   TpM$\
        P                  R\        V4       R24       / p\        V4      pV#   \         d8   pR\        T4      9   d   h \
        P                  RT 2RR	7       / u R
p?# R
p?i\         d'   p\
        P                  RT 2RR	7       / u R
p?# R
p?ii ; i)z1Resolves a schema and returns it as a dictionary.jsonT)modeby_aliasexclude_nonez%Expected Schema after resolving, got z. Returning empty dict.-External or non-local reference not supportedz"Failed to extract schema as dict: Fexc_infoN)rt   ri   rK   
model_dumpr%   r3   r_   rQ   r   r@   r&   r>   	Exception)rU   r   resolved_schemaresultrE   s   &&   r)   _extract_schema_as_dict%OpenAPIParser._extract_schema_as_dict   s    	"//
;O/??;;(33$T 4  OT22(;D<Q;RRij  ,F3FM 	>#a&HLL=aSAELRI 	LL=aSAELRI	s6   B
B C>,C
C>
C>C>C93C>9C>Nc                x   < V ^8  d   QhRS[ S[,          R,          RS[ S[,          R,          RS[ S[,          /# )r"   operation_paramsNpath_item_paramsr$   )r'   r   r   )r(   rR   s   "r)   r*   rS      sE     a  a s)d*a  s)d*a  
m		a r+   c                   . p/ pT;'       g    . T;'       g    . ,           pV EF  p V P                  V4      p\        WpP                  4      '       g%   \        P	                  R\        V4       R24       KU  TP                  p^ RIHp	 \        W4      '       d   VP                  MTp
V P                  V
4      pVP                  pVP                  V
3pW9   d   K  RWM&   / pV'       dn   V P                  V4      pV P                  V4      p\        WP                  4      '       g0   \        VR4      '       d   VP                   e   VP                   VR&   M\        VR4      '       d   VP"                  '       d   \%        \'        VP"                  P)                  4       4      R4      pV'       d   \        VR4      '       d   VP*                  '       dz   VP*                  pV P                  V4      pV P                  V4      p\        VV P                  4      '       g0   \        VR4      '       d   VP                   e   VP                   VR&   \-        VR	R4      p\-        VR
R4      p\/        VP                  VVP0                  VVP2                  VVR7      pVP5                  V4       EK  	  V#   \6         dB   p\-        TR\-        TRR4      4      p\        P9                  RT RT 2RR7        Rp?EK  Rp?ii ; i)z<Extract and resolve parameters from operation and path item.z(Expected Parameter after resolving, got z. Skipping.)EnumTdefaultNcontentmedia_type_schemaexplodestyle)namelocationrequiredschemadescriptionr   r   r   rj   unknownzFailed to extract parameter 'rh   Fr   )rt   ri   rL   r3   r_   rQ   rY   enumr   valuer`   param_schemar   r   rJ   rs   r   r   nextitervaluesr   rq   r   r   r   appendr   r>   )rU   r   r   extracted_paramsseen_params
all_paramsparam_or_ref	parameterrY   r   param_in_strparam_locationparam_schema_obj	param_keyparam_schema_dictr   first_media_typemedia_schemaresolved_media_schemar   r   
param_inforE   
param_names   &&&                     r)   _extract_parameters!OpenAPIParser._extract_parameters   s    13  	 ',,"1A1G1GRH
&LR --l;	!)-?-?@@NNB4	?BSS^_  %--% '1&@&@HNNh  "&!D!D\!R#,#9#9  '^^\:	+)-& %'!#(,(D(DEU(V% '+&7&78H&IO&8J8JKK#OY??+33?7F7N7N))4Y	22y7H7H7H'+D1B1B1I1I1K,Ld'S$(#$46IJJ,>>>'7'I'I,0,H,H,V) 150A0A,0O- *+@$BTBT U U '(=y I I 5 = = I;P;X;X-i8 ")Y=	7D9 +"+&//, ) 5 5#
 !''
3Y 'j    $ &',y*Q
 3J<s1#FQV   	s4   AJ09A"J0BJ0<AJ0CJ00K<;5K77K<c                4   < V ^8  d   QhRS[ RS[R,          /# )r"   request_body_or_refr$   N)r   r   )r(   rR   s   "r)   r*   rS   S  s%     @ @ @SWAW @r+   c                R   V'       g   R#  V P                  V4      p\        W P                  4      '       g%   \        P	                  R\        V4       R24       R# \        VP                  VP                  R7      p\        VR4      '       d   VP                  '       d   VP                  P                  4        Fb  w  rEV'       g   K  \        VR4      '       g   K#  VP                  '       g   K7   V P                  VP                  4      pVVP                  V&   Kd  	  V#   \         d8   pR\!        T4      9   d   h \        P#                  RT R	T 24        Rp?K  Rp?i\$         d'   p\        P#                  RT R	T 24        Rp?K  Rp?ii ; i  \         dG   pR\!        T4      9   d   h \'        TR
R4      p\        P#                  RT R	T 2RR7        Rp?R# Rp?i\$         d6   p\'        TR
R4      p\        P#                  RT R	T 2RR7        Rp?R# Rp?ii ; i)z-Extract and resolve request body information.Nz*Expected RequestBody after resolving, got z. Returning None.)r   r   r   r   r   )Failed to extract schema for media type 'rh   rj   r   z Failed to extract request body 'Fr   )rt   ri   rM   r3   r_   rQ   r   r   r   rs   r   itemsr   r   content_schemar@   r&   r>   r   rq   )	rU   r   request_bodyrequest_body_infomedia_type_strmedia_type_objschema_dictrE   ref_names	   &&       r)   _extract_request_body#OpenAPIParser._extract_request_bodyS  s   ";	,,-@ALl,A,ABB@lAS@TTef  !0%..(44! |Y//L4H4H4H6B6J6J6P6P6R2N&#N4GHH*<<<*.*F*F . @ @+K !, .<<^L 7S6 %$  * NRU !S   !&"LL"KNK[[^_`^a b   ) "LL"KNK[[^_`^a b   	>#a&H2E9EHLL28*CsCe    	2E9EHLL28*CsCe   	s   AF AF !$F 
F F 3*D#F #F.,E F  F-F.F	F FF H&";G##H&0H&1*H!!H&c                &   < V ^8  d   QhRS[ RS[/# )r"   status_coder$   )r&   bool)r(   rR   s   "r)   r*   rS     s     = =3 =4 =r+   c                     \        V4      p^Tu;8*  ;'       d    R8  # u #   \        \        3 d    TP                  4       R9   u # i ; i)z>Check if a status code represents a successful response (2xx).i,  )r   2xx)rn   r@   rx   lower)rU   r   code_ints   && r)   _is_success_status_code%OpenAPIParser._is_success_status_code  sS    	=;'H(((S((((I& 	=$$&*<<<	=s   # # $A
	A
c                `   < V ^8  d   QhRS[ S[S[3,          RS[S[S[3,          R,          /# )r"   operation_responsesr$   N)r%   r&   r   tuple)r(   rR   s   "r)   r*   rS     s2      #'S>	sCx4	r+   c                    V'       g   R# . ROpV F  pW19   g   K  W1V,          3u # 	  VP                  4        F!  w  rEV P                  V4      '       g   K  WE3u # 	  R# )zTGet the primary success response for an MCP tool. We only need one success response.N)200201202204207)r   r   )rU   r   priority_codescoder   resp_or_refs   &&    r)   _get_primary_success_response+OpenAPIParser._get_primary_success_response  si     # = #D*$788 #
 )<(A(A(C$K++K88#11 )D
 r+   c                `   < V ^8  d   QhRS[ S[S[3,          R,          RS[ S[S[3,          /# )r"   r   Nr$   )r%   r&   r   r   )r(   rR   s   "r)   r*   rS     s8     `# `##'S>D#8`#	c<	 `#r+   c           
     @   / pV'       g   V# V P                  V4      pV'       g   \        P                  R4       V# Vw  rE\        P                  RV 24        V P                  V4      p\	        W`P
                  4      '       g(   \        P                  RV R\        V4       R24       V# \        VP                  R7      p\        VR4      '       Ed(   VP                  '       Ed   VP                  P                  4        F  w  rV	'       d   \        V	R4      '       d   V	P                  '       d    R	p
V	P                  p\	        WP                  4      '       dR   VP                  p\	        V\         4      '       d0   VP#                  R
4      '       d   VP%                  R4      R,          p
V P'                  V4      pV
'       d   V
VR&   WP(                  V&   K  VP(                  P1                  V/ 4       K  	  Wr\!        V4      &   V#   \*         d<   pR\!        T4      9   d   h \        P-                  RT RT RT 24        R	p?EKJ  R	p?i\.         d+   p\        P-                  RT RT RT 24        R	p?EK}  R	p?ii ; i  \*         dJ   pR\!        T4      9   d   h \3        TRR4      p\        P-                  RT RT RT 2RR7        R	p?T# R	p?i\.         d9   p\3        TRR4      p\        P-                  RT RT RT 2RR7        R	p?T# R	p?ii ; i)zcExtract and resolve response information. Only includes the primary success response for MCP tools.z;No success responses found, tool will have no output schemaz Using primary success response: z2Expected Response after resolving for status code z, got z. Returning empty responses.)r   r   r   N#/components/schemas/re   x-fastmcp-top-level-schemar   r   z' in response : rj   r   z+Failed to extract response for status code z from reference 'rh   Fr   )r   r3   r4   rt   ri   rN   r_   rQ   r   r   rs   r   r   r   rJ   rj   r&   r0   rl   r   r   r@   r>   r   
setdefaultrq   )rU   r   extracted_responsesprimary_responser   r   response	resp_infor   r   top_level_schema_namer   ry   r   rE   r   s   &&              r)   _extract_responses OpenAPIParser._extract_responses  sE    8:"&&  ==>QRLLVW&&#3 7}EFL	((5Hh(9(9::H V>**FH +* %1E1EFI x++0@0@0@6>6F6F6L6L6N2N&#N4GHH*<<< 481+9+K+KL),8J8JKK*6*:*:#-gs#;#;@R@R$;A" A" =DMM#<Nr<R$9*.*F*F|*TK4$9 !,,H I HS44^D& "00;;NBOU 7OX 5>K 01& #"O  * 	NRU !S   !&"LL"KNK[ \//:m2aS!B   ) "LL"KNK[ \//:m2aS!B   		>#a&H{E9=HLL=k] K##+*Cs4    #"  	{E9=HLL=k] K##+*Cs4    #"	s   AJ -;J )A
J 5A!H0HH/J J/IJ JJJ 9J  JJ L>KL$L%-LLc          	      v   < V ^8  d   QhRS[ RS[ S[S[3,          RS[S[,          R,          RS[S[,          /# )r"   r   all_schemas	collectedNr$   )r%   r&   r   set)r(   rR   s   "r)   r*   rS     sG     1 11 #s(^1 s8d?	1
 
S1r+   c                H   aaa Sf   \        4       oVVV3R loS! V4       S# )a,  
Extract all schema names referenced by a schema (including transitive dependencies).

Args:
    schema: The schema to analyze
    all_schemas: All available schema definitions
    collected: Set of already collected schema names (for recursion)

Returns:
    Set of schema names that are referenced
c                  < \        V \        4      '       d   RV 9   d   \        V R,          \        4      '       dn   V R,          pVP                  R4      '       d   VP	                  R4      R,          pMR# Se/   VS9  d(   VS9   d!   SP                  V4       S! SV,          4       V P                  4        F  pS! V4       K  	  R# \        V \        4      '       d   V  F  pS! V4       K  	  R# R# )z%Recursively find all $ref references.z$refre   N)z#/$defs/r   r   )ri   r%   r&   r0   rl   addr   r'   )objrj   schema_namer   rc   r   r   	find_refss   &    r)   r   =OpenAPIParser._extract_schema_dependencies.<locals>.find_refs+  s    #t$$S=ZFS%A%Af+C~~&KLL&)iinR&8 "-'y8';6!k2!+k":; !ZZ\Ee$ *C&&DdO   'r+   )r   )rU   r   r   r   r   s   &&ff@r)   _extract_schema_dependencies*OpenAPIParser._extract_schema_dependencies  s'    " I	$8 	&r+   c          
      |   < V ^8  d   QhRS[ S[,          RS[R,          RS[S[S[3,          RS[S[S[3,          /# )r"   
parametersr   Nr   r$   )r'   r   r   r%   r&   r   )r(   rR   s   "r)   r*   rS   J  sM     "
 "
'"
 &,"
 #s(^	"

 
c3h"
r+   c                   \        4       pV FD  pVP                  '       g   K  V P                  VP                  V4      pVP                  V4       KF  	  V'       dV   VP                  '       dD   VP                  P                  4        F%  pV P                  Ws4      pVP                  V4       K'  	  V Uu/ uF  qV9   g   K  WV,          bK  	  up# u upi )a  
Extract only the schema definitions needed for input (parameters and request body).

Args:
    parameters: Route parameters
    request_body: Route request body
    all_schemas: All available schema definitions

Returns:
    Dictionary containing only the schemas needed for input
)r   schema_r   updater   r   )	rU   r   r   r   needed_schemasparamdepsr   r   s	   &&&&     r)   "_extract_input_schema_dependencies0OpenAPIParser._extract_input_schema_dependenciesJ  s    "   E}}}88T%%d+   L777"."="="D"D"F88U%%d+ #G 1?
0>+BU#Dd##
 	
 
s   6CCc                n   < V ^8  d   QhRS[ S[S[3,          RS[ S[S[3,          RS[ S[S[3,          /# )r"   	responsesr   r$   )r%   r&   r   r   )r(   rR   s   "r)   r*   rS   n  sC     '
 '
\)*'
 #s(^'
 
c3h	'
r+   c                   V'       d	   V'       g   / # \        4       pVP                  4        F  pVP                  '       g   K  VP                  P                  4        F  pV P                  WR4      pVP	                  V4       VP                  R4      p\        V\        4      '       g   KN  Wr9   g   KV  VP                  V4       V P                  W',          VVR7       K  	  K  	  V Uu/ uF  qV9   g   K  WV,          bK  	  up# u upi )z
Extract only the schema definitions needed for outputs (responses).

Args:
    responses: Route responses
    all_schemas: All available schema definitions

Returns:
    Dictionary containing only the schemas needed for outputs
r   )r   )	r   r   r   r   r   r/   ri   r&   r   )	rU   r  r   r   r   r   r   r   r   s	   &&&      r)   #_extract_output_schema_dependencies1OpenAPIParser._extract_output_schema_dependenciesn  s     I#&5!((*H***"*"9"9"@"@"B88U%%d+,001MNk3//K4N"&&{355#0#"0 6  #C	 +$ 1?
0>+BU#Dd##
 	
 
s   +D8Dc                0   < V ^8  d   QhRS[ S[,          /# )r"   r$   )r'   r   )r(   rR   s   "r)   r*   rS     s     [ [tI [r+   c                >
   . p\        V P                  R4      '       d   V P                  P                  '       g   \        P	                  R4       . # / p\        V P                  R4      '       d   V P                  P
                  '       d   V P                  P
                  p\        VR4      '       d   VP                  '       dy   VP                  P                  4        FZ  w  rE \        WPP                  4      '       d'   V P                  V4      pV P                  V4      W$&   KG  V P                  V4      W$&   K\  	  V'       d?   VP                  4        F*  w  rE\        V\        4      '       g   K  \        V4      W$&   K,  	  V P                  P                  P                  4        EF+  w  r\        WP                  4      '       g(   \        P	                  RV R	\!        V	4       R
24       KH  \        V	R4      '       d   V	P"                  MRp
. R&OpV EF  p\%        WR4      pV'       g   K  \        WP&                  4      '       g   K7  VP)                  4       p V P+                  \%        VRR4      V
4      pV P-                  \%        VRR4      4      pV P/                  \%        VRR4      4      p/ p\        VR4      '       d[   VP0                  '       dI   VP0                  P                  4        UUu/ uF"  w  ppVP3                  R4      '       g   K  VVbK$  	  pppV P5                  VVV4      pV P7                  VV4      p\9        TT\%        VRR4      \%        VRR4      \%        VRR4      \%        VR. 4      ;'       g    . VVVVVVV P:                  R7      p \=        VRR7      w  ppVVn        VVn         VPC                  V4       EK  	  EK.  	  \        PK                  R$\M        V4       R%24       V#   \         d(   p\        P	                  RT RT 24        Rp?EKI  Rp?ii ; iu uppi   \         d;   p\        P	                  RT RT RT 24       RRR/ /Tn        / Tn          Rp?LRp?ii ; i  \D         dN   pR\G        T4      9   d   h \%        TRR4      p\        PI                  RT RT R T R!T 2R"R#7        Rp?EK  Rp?i\         d=   p\%        TRR4      p\        PI                  RT RT R T R!T 2R"R#7        Rp?EK  Rp?ii ; i)'z*Parse the OpenAPI schema into HTTP routes.pathsz$OpenAPI schema has no paths defined.rf   schemasz%Failed to extract schema definition 'rh   Nz%Skipping invalid path item for path 'z	' (type: )r   requestBodyr  rr   zx-operationIdsummaryr   tags)r\   methodoperation_idr  r   r  r   r   r  request_schemasresponse_schemas
extensionsrA   F)convert_refsz)Failed to pre-calculate schema for route  r   rQ   object
propertiesr   r   zFailed to process operation z (ID: z): Tr   zFinished parsing. Extracted z HTTP routes.)r/   putpostdeleteoptionsheadpatchtrace)'rs   r-   r  r3   r_   rf   r  r   ri   rJ   rt   r   r   r%   r   rP   rQ   r   rq   rO   upperr   r   r   rr   r0   r   r  r   rA   r   flat_param_schemaparameter_mapr   r@   r&   r>   r4   len)rU   routesschema_definitionsrf   r   r   r   rE   path_strpath_item_objpath_level_paramshttp_methodsmethod_lower	operationmethod_upperr   r   r  r  kvinput_schemasoutput_schemasrouteflat_schema	param_mapschema_errorop_errorop_ids   &                            r)   r=   OpenAPIParser.parse  s   "$t||W--T\\5G5G5GNNABI  4<<..4<<3J3J3J00Jz9--*2D2D2D$.$6$6$<$<$>LD%f.@.@AA.2.?.?.GO7;7S7S /8.4 8<7S7S &8.4 %?"  2 8 8 :fd++/Ef/M&, !;
 (,||'9'9'?'?'A#Hm-?-?@@;H:YtTaObNccde  =,77 (( 	L !-#MF	9I7I7I!J!J#/#5#5#7LT%)%=%=#I|TBDU&
 -1,F,F#I}dC-) %)$;$;#I{DA%	 &(
"9m<<AVAVAV -6,A,A,G,G,I*,IDAq#$<<#5 !%1,I ' * )-(O(O&-.)
 *.)Q)Q%.* !*!)#/)0M4)P$+Iy$$G(/	=$(O!(FB!?!E!E2'1):&/,9-;'1,0,@,@!"55T %-262K 7BE32;E/ e,U !-1 (Bj 	3CK=NOG % CD6QCP v*T  ) 	5"NN"KL>YZ[cZddfgsft u
 !' ,b7E3 35E//	5 & 
Jc$O  " '	=) L:<.(SYZ_Y``cdlcmn%) %   %  '	=) L:<.(SYZ_Y``cdlcmn%) %  s   &?O<'O<A:Q?Q?6P1
P1
B Q?P7=Q?<P.P))P.1Q?7Q<0Q72Q?7Q<<Q??T
ASTT 0TT)	r-   rA   rO   rL   rP   rJ   rM   rN   rK   )NN)N)__name__
__module____qualname____firstlineno____doc__rV   r`   rt   r   r   r   r   r   r   r   r   r  r=   __static_attributes____classdictcell__)rR   s   @r)   r5   r5   m   s      f/ /.0 05 5n @a  a F@ @D= = .`# `#D1 1f"
 "
H'
 '
R[ [r+   r5   rG   N)4r:  typingr   r   r   r   openapi_pydanticr   r   r   r	   r
   r   r   r   openapi_pydantic.v3.v3_0r1   r;   r8   r<   r6   r9   r:   r7   pydanticr   r   fastmcp.utilities.loggingr   modelsr   r   r   r   r   r   r  r   r   r6  r3   r   r   r   r   r   r   r   r    rG   r5   __all__ r+   r)   <module>rE     s   N . .	 	 	 ; > > < > B < 8 / 0 
 
H	 :w
3
)VY
/\9l;
\9l;
~{NCK;7	\9l;
K;7	3LlE		ET "r+   