Closed HassanAbbas7357 closed 1 year ago
Hello there, i have got an api API i copied its json reponse and pasted in this online tool JOSN to Schema converter
i have got a schema now i have created a json file and pasted schema in it
and wanted to use it in Pytest_Schema directly like this
def getSchemafromJSONAndCompareSchema(JsonResp, filename): filepath = filename with open(filepath, 'r') as f: data = json.load(f) assert exact_schema(data) == JsonResp # schema.validate(JsonResp,data) return data
but its not working as i expected can you tell me if its going to work any way? or i have to always create schema objects from Schema class manually?
i got my solution its jsonschema package that should be used in my case thanks iam closing the issue
Hello there, i have got an api API i copied its json reponse and pasted in this online tool JOSN to Schema converter
i have got a schema now i have created a json file and pasted schema in it
and wanted to use it in Pytest_Schema directly like this
but its not working as i expected can you tell me if its going to work any way? or i have to always create schema objects from Schema class manually?