Skip to content

Commit

Permalink
Ignore x-stripeError custom annotation (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym-stripe committed Oct 12, 2023
1 parent 83c7b3c commit f82194b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server/server_test.go
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
"github.com/stripe/stripe-mock/embedded"
"io/ioutil"
"net/http"
"net/http/httptest"
Expand Down Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions spec/spec.go
Expand Up @@ -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
Expand Down

0 comments on commit f82194b

Please sign in to comment.