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

feat: support array selectors for preset arguments #48

Merged
merged 7 commits into from
Dec 24, 2024

Conversation

hgiasac
Copy link
Collaborator

@hgiasac hgiasac commented Dec 22, 2024

  • Support array selectors for preset arguments.
  • Breaking changes: separate read and write object types to avoid conflicts when applying argument presets to object types shared for both request and response body.
{
  "settings": {
    "argumentPresets": [
      {
        "path": "body.categories[*].id",
        "value": {
          "type": "literal",
          "value": 1
        },
        "targets": []
      },
      {
        "path": "body.categories[*].addresses[0].name",
        "value": {
          "type": "literal",
          "value": "Street 0"
        },
        "targets": []
      },
      {
        "path": "body.categories[*].addresses[1:3].name",
        "value": {
          "type": "literal",
          "value": "Street 1"
        },
        "targets": []
      }
    ]
  }
}

Copy link

github-actions bot commented Dec 22, 2024

Code Coverage

Package Line Rate Health
github.com/hasura/ndc-http/connector 63%
github.com/hasura/ndc-http/connector/internal/argument 53%
github.com/hasura/ndc-http/connector/internal 55%
github.com/hasura/ndc-http/connector/internal/compression 64%
github.com/hasura/ndc-http/connector/internal/contenttype 56%
github.com/hasura/ndc-http/connector/internal/security 60%
github.com/hasura/ndc-http/ndc-http-schema/configuration 40%
github.com/hasura/ndc-http/ndc-http-schema/openapi/internal 46%
github.com/hasura/ndc-http/ndc-http-schema/openapi 40%
github.com/hasura/ndc-http/ndc-http-schema/schema 32%
github.com/hasura/ndc-http/ndc-http-schema/utils 44%
github.com/hasura/ndc-http/ndc-http-schema/version 26%
Summary 48% (4547 / 9471)

Minimum allowed line rate is 40%

@hgiasac hgiasac marked this pull request as ready for review December 24, 2024 07:43
@hgiasac hgiasac merged commit 4818ef4 into main Dec 24, 2024
4 checks passed
@hgiasac hgiasac deleted the support-argument-preset-array branch December 24, 2024 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant