
    R1i                     "    d dl Z d dlZd dlZd Zy)    Nc                 h   | d   j                  d      rBt        j                  j                  t        j                  j	                  t
              d      }na| d   j                  d      rBt        j                  j                  t        j                  j	                  t
              d      }nt        d      t        |      5 }t        j                  |      }ddd       dd	l
m} t        j                   |       j                  |             } t        j                  | 
       y# 1 sw Y   PxY w)av  
    Validate generated API schema against OpenAPI 3.0.X json schema specification.
    Note: On conflict, the written specification always wins over the json schema.

    OpenApi3 schema specification taken from:

    https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v3.0/schema.json
    https://github.com/OAI/OpenAPI-Specification/blob/9dff244e5708fbe16e768738f4f17cf3fddf4066/schemas/v3.0/schema.json

    https://github.com/OAI/OpenAPI-Specification/blob/main/schemas/v3.1/schema.json
    https://github.com/OAI/OpenAPI-Specification/blob/9dff244e5708fbe16e768738f4f17cf3fddf4066/schemas/v3.1/schema.json
    openapiz3.0zopenapi_3_0_schema.jsonz3.1zopenapi_3_1_schema.jsonz%No validation specification availableNr   )OpenApiJsonRenderer)instanceschema)
startswithospathjoindirname__file__RuntimeErroropenjsonloaddrf_spectacular.renderersr   loadsrender
jsonschemavalidate)
api_schemaschema_spec_pathfhopenapi3_schema_specr   s        g/home/cursorai/projects/iching/venv/lib/python3.12/site-packages/drf_spectacular/validation/__init__.pyvalidate_schemar      s     )''.77<<(AC\]	I		)	)%	077<<(AC\]BCC		2#yy} 
  >/188DEJ4HI 
 	s   D((D1)r   r	   r   r        r   <module>r      s     	 Jr   