Skip to content

Use examples as default requestbody #20

@thigg

Description

@thigg

I have examples defined in my openapi spec. It would be very nice if I could use these as default values in n8n

"requestBody": {
          "description": "Contact information to create or update",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertRequest"
              },
              "examples": {
                "Create a new contact": {
                  "summary": "Create a new contact with basic information",
                  "description": "Create a new contact",
                  "value": {
                    "credentialName": "my-carddav-server",
                    "contact": {
                      "displayName": "John Doe",
                      "email": "[email protected]",
                      "firstName": "John",
                      "lastName": "Doe",
                      "telephone": "+1234567890",
                      "address": {
                        "street": "Main Street 123",
                        "postalCode": "12345",
                        "locality": "Anytown",
                        "region": "State",
                        "country": "Country"
                      }
                    },
                    "appendNote": "Added via API"
                  }
                }
              }
            }

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions