I’m already doing that actually:
props = properties.copy()
# Summarize the description of the endpoint in markdown
#summary_chain_response = endpoint_summary_chain.invoke({"raw_description": properties['description']})
#props['description'] = summary_chain_response.content
#endpoint_object = {"path": path, "method": method, "tags": props["tags"], "schema": str(props)}
endpoint_object = props
# Change the description from HTML to markdown format
props['description'] = md(props['description'])
# Generate deterministic UUID from OperationID
endpoint_uuid = generate_uuid5(props['operationId'])
#Weaviate does not like straight response codes as object keys i.e. 200 or 404 so we need to change that
responses_with_new_keys = {}
for response_code, response_schema in endpoint_object['responses'].copy().items():
stringified_response_code = response_code_to_string(int(response_code))
responses_with_new_keys[stringified_response_code] = response_schema
# Replace all keys
endpoint_object['responses'] = responses_with_new_keys
documents.append(endpoint_object)
if not test_collection.data.exists(endpoint_uuid):
test_collection.data.insert(
properties = endpoint_object,
uuid=endpoint_uuid
)
the problem is with a specific property having an example. Weaviate thinks this should be in UUID format but it shouldn’t as it’s an IBAN