OpenSearch/docs/reference
Lee Hinman 8aa0a5c111 Improve REST error handling when endpoint does not support HTTP verb, add OPTIONS support (#24437)
* Improved REST endpoint exception handling, see #15335

Also improved OPTIONS http method handling to better conform with the
http spec.

* Tidied up formatting and comments

See #15335

* Tests for #15335

* Cleaned up comments, added section number

* Swapped out tab indents for space indents

* Test class now extends ESSingleNodeTestCase

* Capture RestResponse so it can be examined in test cases

Simple addition to surface the RestResponse object so we can run tests
against it (see issue #15335).

* Refactored class name, included feedback

See #15335.

* Unit test for REST error handling enhancements

Randomizing unit test for enhanced REST response error handling. See
issue #15335 for more details.

* Cleaned up formatting

* New constructor to set HTTP method

Constructor added to support RestController test cases.

* Refactored FakeRestRequest, streamlined test case.

* Cleaned up conflicts

* Tests for #15335

* Added functionality to ignore or include path wildcards

See #15335

* Further enhancements to request handling

Refactored executeHandler to prioritize explicit path matches. See
#15335 for more information.

* Cosmetic fixes

* Refactored method handlers

* Removed redundant import

* Updated integration tests

* Refactoring to address issue #17853

* Cleaned up test assertions

* Fixed edge case if OPTIONS method randomly selected as invalid method

In this test, an OPTIONS method request is valid, and should not return
a 405 error.

* Remove redundant static modifier

* Hook the multiple PathTrie attempts into RestHandler.dispatchRequest

* Add missing space

* Correctly retrieve new handler for each Trie strategy

* Only copy headers to threadcontext once

* Fix test after REST header copying moved higher up

* Restore original params when trying the next trie candidate

* Remove OPTIONS for invalidHttpMethodArray so a 405 is guaranteed in tests

* Re-add the fix I already added and got removed during merge :-/

* Add missing GET method to test

* Add documentation to migration guide about breaking 404 -> 405 changes

* Explain boolean response, pull into local var

* fixup! Explain boolean response, pull into local var

* Encapsulate multiple HTTP methods into PathTrie<MethodHandlers>

* Add PathTrie.retrieveAll where all matching modes can be retrieved

Then TrieMatchingMode can be package private and not leak into RestController

* Include body of error with 405 responses to give hint about valid methods

* Fix missing usageService handler addition

I accidentally removed this :X

* Initialize PathTrieIterator modes with Arrays.asList

* Use "== false" instead of !

* Missing paren :-/
2017-07-07 09:01:23 -06:00
..
aggregations Remove usage of multi-types from the docs and added a page explaining type removal (#25543) 2017-07-05 12:30:19 +02:00
analysis Parse synonyms with the same analysis chain (#8049) 2017-06-20 21:50:33 +09:00
cat Remove usage of multi-types from the docs and added a page explaining type removal (#25543) 2017-07-05 12:30:19 +02:00
cluster Adds nodes usage API to monitor usages of actions (#24169) 2017-06-02 08:46:38 +01:00
docs Remove usage of multi-types from the docs and added a page explaining type removal (#25543) 2017-07-05 12:30:19 +02:00
how-to More advices around search speed and disk usage. (#25252) 2017-06-16 11:23:40 +02:00
images Update MSI installer images (#25414) 2017-06-28 09:04:23 +10:00
index-modules Enable a long translog retention policy by default (#25294) 2017-06-22 17:08:14 +02:00
indices Remove usage of multi-types from the docs and added a page explaining type removal (#25543) 2017-07-05 12:30:19 +02:00
ingest Remove usage of multi-types from the docs and added a page explaining type removal (#25543) 2017-07-05 12:30:19 +02:00
mapping parent/child: Removed ParentJoinFieldSubFetchPhase 2017-07-06 13:15:02 +02:00
migration Improve REST error handling when endpoint does not support HTTP verb, add OPTIONS support (#24437) 2017-07-07 09:01:23 -06:00
modules Tidied up the disk allocator docs 2017-07-06 12:16:53 +02:00
query-dsl Remove usage of multi-types from the docs and added a page explaining type removal (#25543) 2017-07-05 12:30:19 +02:00
release-notes Added release notes for 6.0.0-alpha2 2017-06-06 11:52:18 +02:00
search parent/child: Removed ParentJoinFieldSubFetchPhase 2017-07-06 13:15:02 +02:00
setup [Docs] Fix typo in bootstrap-checks.asciidoc (#25597) 2017-07-07 15:37:40 +02:00
testing Docs: Replace deprecated pluginList with Arrays.asList (#24270) 2017-04-24 13:30:37 +02:00
aggregations.asciidoc Update aggregation.asciidoc (#24042) 2017-04-11 09:02:38 -04:00
analysis.asciidoc Add the ability to set an analyzer on keyword fields. (#21919) 2016-12-30 09:36:10 +01:00
api-conventions.asciidoc Remove (deprecated) support for '+' in index expressions (#25274) 2017-06-19 15:19:17 +02:00
cat.asciidoc [DOCS] Fixed various typos in the 'cat APIs' section (#23216) 2017-02-16 20:41:42 +01:00
cluster.asciidoc [docs] include two cluster doc pages missing from index (#25180) 2017-06-12 12:33:56 -07:00
docs.asciidoc Inclusion of link to Multi Delete (#22619) 2017-01-16 12:58:59 +01:00
getting-started.asciidoc Remove usage of multi-types from the docs and added a page explaining type removal (#25543) 2017-07-05 12:30:19 +02:00
glossary.asciidoc Remove usage of multi-types from the docs and added a page explaining type removal (#25543) 2017-07-05 12:30:19 +02:00
how-to.asciidoc Correct grammar in list in how-to docs 2017-01-17 20:57:22 -05:00
index-modules.asciidoc [DOCS] reworded to prevent code span rendering glitch (#25442) 2017-06-28 11:48:31 +01:00
index-shared1.asciidoc [DOCS] Split index-shared.asciidoc into multiple smaller files (#25302) 2017-06-19 15:14:53 -07:00
index-shared2.asciidoc [DOCS] Split index-shared.asciidoc into multiple smaller files (#25302) 2017-06-19 15:14:53 -07:00
index-shared3.asciidoc [DOCS] Split index-shared.asciidoc into multiple smaller files (#25302) 2017-06-19 15:14:53 -07:00
index.asciidoc Include shared/attributes.asciidoc from docs master 2017-07-03 18:17:34 +02:00
indices.asciidoc Remove shadow replicas 2017-04-11 11:26:26 -06:00
ingest.asciidoc Renamed all AUTOSENSE snippets to CONSOLE (#18210) 2016-05-09 15:42:23 +02:00
mapping.asciidoc Remove usage of multi-types from the docs and added a page explaining type removal (#25543) 2017-07-05 12:30:19 +02:00
modules.asciidoc Docs: Cross-cluster search doc wasn't being included 2017-01-18 10:02:51 +01:00
query-dsl.asciidoc Fixed broken xrefs to query-dsl-not-query, which has been removed. 2015-10-20 13:01:37 -07:00
redirects.asciidoc Remove usage of multi-types from the docs and added a page explaining type removal (#25543) 2017-07-05 12:30:19 +02:00
release-notes.asciidoc Added release notes for 6.0.0-alpha2 2017-06-06 11:52:18 +02:00
search.asciidoc Include missing field-caps docs in search 2017-04-18 10:31:35 +02:00
setup.asciidoc Remove implicit 32-bit support 2017-06-28 08:24:33 -04:00
testing.asciidoc [DOCS] Test framework documentation 2013-12-02 18:01:45 +01:00