Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 66 for AnyOf (0.31 seconds)

  1. tests/test_tutorial/test_body_nested_models/test_tutorial004.py

                                    "type": "string",
                                },
                                "description": {
                                    "title": "Description",
                                    "anyOf": [{"type": "string"}, {"type": "null"}],
                                },
                                "price": {
                                    "title": "Price",
                                    "type": "number",
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 9.5K bytes
    - Click Count (0)
  2. src/test/java/org/codelibs/fess/it/search/HealthApiTests.java

                    .body("data.status", anyOf(equalTo("green"), equalTo("yellow"), equalTo("red")));
        }
    
        @Test
        public void testHealthCheck_withoutContentType() {
            given().when()
                    .get("/api/v1/health")
                    .then()
                    .statusCode(200)
                    .body("data", notNullValue())
                    .body("data.status", anyOf(equalTo("green"), equalTo("yellow"), equalTo("red")));
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sat Dec 20 03:03:44 GMT 2025
    - 2.1K bytes
    - Click Count (0)
  3. docs/en/docs/tutorial/extra-models.md

    {* ../../docs_src/extra_models/tutorial002_py310.py hl[7,13:14,17:18,21:22] *}
    
    ## `Union` or `anyOf` { #union-or-anyof }
    
    You can declare a response to be the `Union` of two or more types, that means, that the response would be any of them.
    
    It will be defined in OpenAPI with `anyOf`.
    
    To do that, use the standard Python type hint [`typing.Union`](https://docs.python.org/3/library/typing.html#typing.Union):
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 6.7K bytes
    - Click Count (0)
  4. tests/test_request_params/test_form/test_optional_str.py

        openapi = app.openapi()
        body_model_name = get_body_model_name(openapi, path)
    
        assert app.openapi()["components"]["schemas"][body_model_name] == {
            "properties": {
                "p": {
                    "anyOf": [{"type": "string"}, {"type": "null"}],
                    "title": "P",
                },
            },
            "title": body_model_name,
            "type": "object",
        }
    
    
    @pytest.mark.parametrize(
        "path",
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 8.9K bytes
    - Click Count (0)
  5. build-tools-internal/src/integTest/java/org/elasticsearch/gradle/internal/SymbolicLinkPreservingTarIT.java

                        assertThat(entry.getLinkName(), anyOf(equalTo("../real-folder/file"), equalTo("..\\real-folder\\file")));
                        linkInFolderLinkToFileEntry = true;
                    } else if (entry.getName().equals("link-to-real-folder")) {
                        assertTrue(entry.isSymbolicLink());
                        assertThat(entry.getLinkName(), anyOf(equalTo("./real-folder"), equalTo(".\\real-folder")));
    Created: Wed Apr 08 16:19:15 GMT 2026
    - Last Modified: Tue Jun 01 09:19:30 GMT 2021
    - 6.6K bytes
    - Click Count (0)
  6. tests/test_request_params/test_query/test_optional_list.py

        assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot(
            [
                {
                    "required": False,
                    "schema": {
                        "anyOf": [
                            {"items": {"type": "string"}, "type": "array"},
                            {"type": "null"},
                        ],
                        "title": "P",
                    },
                    "name": "p",
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 9.4K bytes
    - Click Count (0)
  7. tests/test_request_params/test_header/test_optional_str.py

    def test_optional_str_schema(path: str):
        assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot(
            [
                {
                    "required": False,
                    "schema": {
                        "anyOf": [{"type": "string"}, {"type": "null"}],
                        "title": "P",
                    },
                    "name": "p",
                    "in": "header",
                }
            ]
        )
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 8.5K bytes
    - Click Count (0)
  8. tests/test_schema_compat_pydantic_v2.py

                                "properties": {
                                    "username": {"type": "string", "title": "Username"},
                                    "role": {
                                        "anyOf": [
                                            {"$ref": "#/components/schemas/PlatformRole"},
                                            {"enum": [], "title": "OtherRole"},
                                        ],
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Mon Mar 23 12:36:49 GMT 2026
    - 4.1K bytes
    - Click Count (0)
  9. tests/test_security_oauth2_optional.py

                                    "title": "Client Id",
                                    "anyOf": [{"type": "string"}, {"type": "null"}],
                                },
                                "client_secret": {
                                    "title": "Client Secret",
                                    "anyOf": [{"type": "string"}, {"type": "null"}],
                                },
                            },
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 9.8K bytes
    - Click Count (0)
  10. tests/test_request_params/test_cookie/test_optional_str.py

    def test_optional_str_schema(path: str):
        assert app.openapi()["paths"][path]["get"]["parameters"] == snapshot(
            [
                {
                    "required": False,
                    "schema": {
                        "anyOf": [{"type": "string"}, {"type": "null"}],
                        "title": "P",
                    },
                    "name": "p",
                    "in": "cookie",
                }
            ]
        )
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 8.6K bytes
    - Click Count (0)
Back to Top