Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mapping types in OpenAPI schema #476

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Commits on Jan 27, 2024

  1. Support mapping types in OpenAPI schema

    It is useful to return some grouped data
    ```python
    @DataClass
    class User:
        id: str
        name: str
    ```
    
    Example for `Dict[str, list[User]]`
    
    ```json
    {
      "type": "object",
      "patternProperties": {
        "^[a-z0-9!\"#$%&'()*+,.\/:;<=>?@\[\] ^_`{|}~-]+$": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": { "type": "string" },
              "name": { "type": "string" }
            },
            "required": ["id", "name"]
          }
        }
      }
    }
    
    ```
    tyzhnenko committed Jan 27, 2024
    Configuration menu
    Copy the full SHA
    9e905a5 View commit details
    Browse the repository at this point in the history
  2. Pin black to 23.12.1

    tyzhnenko committed Jan 27, 2024
    Configuration menu
    Copy the full SHA
    7d6659b View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2024

  1. Configuration menu
    Copy the full SHA
    5b276a0 View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2024

  1. Configuration menu
    Copy the full SHA
    5fddfaf View commit details
    Browse the repository at this point in the history