def openapi_spec(cls): """OpenAPI representation of the user-contributed JSONSchema.""" return convert(cls.complete_schema())
def json_schema_to_openapi_object(json_schema): schema = convert(json_schema) return openapi.Schema(type=openapi.TYPE_OBJECT, properties=schema.get("properties", {}), required=schema.get("required", []))