diff --git a/server/server_test.go b/server/server_test.go index b70642ff..f4f994e3 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -5,6 +5,7 @@ import ( "encoding/base64" "encoding/json" "fmt" + "github.com/stripe/stripe-mock/embedded" "io/ioutil" "net/http" "net/http/httptest" @@ -277,6 +278,13 @@ func initTestSpec() { // Tests // +func TestCanLoadEmbeddedSpecs(t *testing.T) { + _, err := LoadSpec(embedded.OpenAPISpec, "") + assert.NoError(t, err) + _, err = LoadSpec(embedded.BetaOpenAPISpec, "") + assert.NoError(t, err) +} + func TestDoubleSlashFixHandler(t *testing.T) { var lastPath string diff --git a/spec/spec.go b/spec/spec.go index c26791a5..1f90048c 100644 --- a/spec/spec.go +++ b/spec/spec.go @@ -84,6 +84,7 @@ var supportedSchemaFields = []string{ "x-stripeResource", "x-stripeOperations", "x-stripeParam", + "x-stripeEvent", // This is currently a hint for the server-side so I haven't included it in // Schema yet. If we do start validating responses that come out of