Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for output (0.18 sec)

  1. tests/test_openapi_separate_input_output_schemas.py

        sub: Optional[SubItem] = None
        if PYDANTIC_V2:
            model_config = {"json_schema_serialization_defaults_required": True}
    
    
    def get_app_client(separate_input_output_schemas: bool = True) -> TestClient:
        app = FastAPI(separate_input_output_schemas=separate_input_output_schemas)
    
        @app.post("/items/")
        def create_item(item: Item):
            return item
    
        @app.post("/items-list/")
        def create_item_list(item: List[Item]):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 18.4K bytes
    - Viewed (2)
  2. fastapi/openapi/utils.py

            components["schemas"] = {k: definitions[k] for k in sorted(definitions)}
        if components:
            output["components"] = components
        output["paths"] = paths
        if webhook_paths:
            output["webhooks"] = webhook_paths
        if tags:
            output["tags"] = tags
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 21.8K bytes
    - Viewed (0)
  3. docs_src/separate_openapi_schemas/tutorial002_py310.py

    from fastapi import FastAPI
    from pydantic import BaseModel
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
    
    
    app = FastAPI(separate_input_output_schemas=False)
    
    
    @app.post("/items/")
    def create_item(item: Item):
        return item
    
    
    @app.get("/items/")
    def read_items() -> list[Item]:
        return [
            Item(
                name="Portal Gun",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 486 bytes
    - Viewed (0)
  4. ci/official/utilities/extract_resultstore_links.py

                      'These can be then printed out, and/or output into a '
                      'JUnit-based XML file inside a specified directory.')
    
      parser.add_argument('build_log',
                          help='Path to a build log.')
      parser.add_argument('--xml-out-path',
                          required=False,
                          help='Path to which to output '
                               'the JUnit-based XML with ResultStore links.')
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Nov 08 17:50:27 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  5. ci/official/containers/linux_arm64/devel.usertools/squash_testlogs.py

    # limitations under the License.
    # ==============================================================================
    """Merge all JUnit test.xml files in one directory into one.
    
    Usage: squash_testlogs.py START_DIRECTORY OUTPUT_FILE
    
    Example: squash_testlogs.py /tf/pkg/testlogs /tf/pkg/merged.xml
    
    Recursively find all the JUnit test.xml files in one directory, and merge any
    of them that contain failures into one file. The TensorFlow DevInfra team
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Sep 18 19:00:37 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  6. fastapi/encoders.py

                if it should exclude from the output the fields that had the same default
                value, even when they were explicitly set.
                """
            ),
        ] = False,
        exclude_none: Annotated[
            bool,
            Doc(
                """
                Pydantic's `exclude_none` parameter, passed to Pydantic models to define
                if it should exclude from the output any fields that have a `None` value.
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  7. docs_src/separate_openapi_schemas/tutorial002_py39.py

    from typing import Optional
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    
    class Item(BaseModel):
        name: str
        description: Optional[str] = None
    
    
    app = FastAPI(separate_input_output_schemas=False)
    
    
    @app.post("/items/")
    def create_item(item: Item):
        return item
    
    
    @app.get("/items/")
    def read_items() -> list[Item]:
        return [
            Item(
                name="Portal Gun",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 518 bytes
    - Viewed (0)
  8. scripts/playwright/separate_openapi_schemas/image04.py

        page = context.new_page()
        page.goto("http://localhost:8000/docs")
        page.get_by_role("button", name="Item-Input").click()
        page.get_by_role("button", name="Item-Output").click()
        page.set_viewport_size({"width": 960, "height": 820})
        page.screenshot(
            path="docs/en/docs/img/tutorial/separate-openapi-schemas/image04.png"
        )
        # ---------------------
        context.close()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 881 bytes
    - Viewed (0)
  9. fastapi/_compat.py

                Tuple[ModelField, Literal["validation", "serialization"]], JsonSchemaValue
            ],
            separate_input_output_schemas: bool = True,
        ) -> Dict[str, Any]:
            override_mode: Union[Literal["validation"], None] = (
                None if separate_input_output_schemas else "validation"
            )
            # This expects that GenerateJsonSchema was already used to generate the definitions
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  10. configure.py

        try:
          output = run_shell(device_query_bin).split('\n')
          pattern = re.compile('[0-9]*\\.[0-9]*')
          output = [pattern.search(x) for x in output if 'Capability' in x]
          output = ','.join(x.group() for x in output if x is not None)
        except subprocess.CalledProcessError:
          output = ''
      else:
        output = ''
      return output
    
    
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 18:25:36 GMT 2024
    - 53.8K bytes
    - Viewed (0)
Back to top