Prakhar Roy
05/30/2024, 6:38 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Prakhar Roy
05/30/2024, 7:09 AMvoid Main()
{
var schema = JsonSchema.Parse(
@"{
'type': 'object',
'properties': {
'name': {'type':'string'},
'hobbies': {'type': 'array'}
},
'additionalProperties': false
}");
IsValid(JObject.Parse(
@"{
'name': 'James',
'hobbies': ['.NET', 'LOLCATS']
}"),
schema).Dump();
IsValid(JObject.Parse(
@"{
'surname': 2,
'hobbies': ['.NET', 'LOLCATS']
}"),
schema).Dump();
IsValid(JObject.Parse(
@"{
'name': 2,
'hobbies': ['.NET', 'LOLCATS']
}"),
schema).Dump();
}
public bool IsValid(JObject obj, JsonSchema schema)
{
return obj.IsValid(schema);
}
We wanted to know if we could get that schema from Pact broker.
Currently with your help we have implemented PactFlow SAAS in our org end to end and built contracts. Our CICD jobs are setup.
We are exploring some additional usage of pactflow right now.Matt (pactflow.io / pact-js / pact-go)
Prakhar Roy
05/30/2024, 7:24 AMMatt (pactflow.io / pact-js / pact-go)