Example #1
0
def create_dynamic_schema(objects_json, urls_json):
    schema = Schema("./tests/files/empty_schema.json")
    schema.create_objects(objects_json)
    schema.create_apis(urls_json)
    schema.validate_apis_and_objects()
    schema.add_relationship_objects()
    return schema
Example #2
0
def create_dynamic_schema(objects_json, urls_json):
    schema = Schema("./tests/files/empty_schema.json")
    schema.create_objects(objects_json)
    schema.create_apis(urls_json)
    schema.validate_apis_and_objects()
    schema.add_relationship_objects()
    return schema
Example #3
0
 def test_create_objects(self):
     schema = Schema("./tests/files/empty_schema.json")
     self.assertEqual(schema.data_objects, {})
     schema.create_objects({
         "$resetPasswordRequest": {
             "email": "string"
         },
         "$resetPasswordResponse": {
             "status": "string"
         }
     })
     self.assertEqual(len(schema.data_objects), 2)
     self.assertEqual(schema.data_objects['$resetPasswordRequest'].name, '$resetPasswordRequest')