Testing
- Test Code is from https://github.com/stripe/stripe-python/tree/5202e51e114cc71182a71b980b8e2ac51eb175df/tests
fixtures3.yamlandopenapi.spec3.jsonis from https://github.com/stripe/openapi
- For the latest
openapi.spec3.jsonyou need to replace all occurrences of “oneOf” with “anyOf” because stripe-mock does not support “oneOf”. - You can do this with the following command:
sed -i 's/"oneOf"/"anyOf"/g' openapi.spec3.json
- The “unsupported field in JSON schema: ‘oneOf’” error occurs because stripe-mock relies on an underlying validation library (go-jsval) that does not support the oneOf keyword introduced in OpenAPI 3.0.