Skip to content

Commit

Permalink
update spec regarding cors (#521)
Browse files Browse the repository at this point in the history
* update spec regarding cors

* Update spec/src/main/asciidoc/microprofile-openapi-spec.asciidoc

Co-authored-by: Michael Edgar <michael@xlate.io>

Co-authored-by: Michael Edgar <michael@xlate.io>
  • Loading branch information
Emily-Jiang and MikeEdgar committed Mar 22, 2022
1 parent 685c407 commit 855a4f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions spec/src/main/asciidoc/microprofile-openapi-spec.asciidoc
Expand Up @@ -779,7 +779,8 @@ ignore, reject, or pass-through invalid inputs).

=== Cross Origin Resource Sharing (CORS)

The MP OpenAPI 1.0 specification does not require vendors to support https://www.w3.org/TR/cors/[CORS]
for the `/openapi` endpoint. The behavior of CORS requests is implementation dependent.
The MP OpenAPI specification does not mandate but recommends vendors support https://www.w3.org/TR/cors/[CORS]
for the `/openapi` endpoint. Without CORS support, tools such as Swagger-UI might experience some errors.
However, the behavior of CORS requests is implementation dependent.

include::release_notes.asciidoc[]
Expand Up @@ -935,15 +935,15 @@ public void testDefaultParameterRequirement(String type) {

vr.body(params + ".find{ it.name == 'minRating' }", hasEntry(equalTo("in"), equalTo("query")));
vr.body(params + ".find{ it.name == 'minRating' }", either(not(hasKey("required")))
.or(hasEntry(equalTo("required"), equalTo(false))));
.or(hasEntry(equalTo("required"), equalTo(false))));

vr.body(params + ".find{ it.name == 'If-Match' }", hasEntry(equalTo("in"), equalTo("header")));
vr.body(params + ".find{ it.name == 'If-Match' }", either(not(hasKey("required")))
.or(hasEntry(equalTo("required"), equalTo(false))));
.or(hasEntry(equalTo("required"), equalTo(false))));

vr.body(params + ".find{ it.name == 'trackme' }", hasEntry(equalTo("in"), equalTo("cookie")));
vr.body(params + ".find{ it.name == 'trackme' }", either(not(hasKey("required")))
.or(hasEntry(equalTo("required"), equalTo(false))));
.or(hasEntry(equalTo("required"), equalTo(false))));
}

@RunAsClient
Expand Down

0 comments on commit 855a4f0

Please sign in to comment.