I couldn't find a way to read from a string, without spamming a temporary file. ```py from openapi_spec_validator import validate schema_text = """{"openapi": "3.0.0"}""" schema: Schema = ???(schema_text) validate(schema) ````
Activity
p1c2u commentedon Jun 26, 2024
echo "string" | openapi-spec-validator -
luckydonald commentedon Jun 26, 2024
Apologies, I mean from within python.
there's
read_from_filename,read_from_stdin, but noread_from_str.p1c2u commentedon Jul 2, 2024
just use
json.loads?kurtmckee commentedon Jun 26, 2025
@luckydonald Code similar to this may do what you want.
@p1c2u I recommend closing this issue. It's had no follow-up in the past year.