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

chore: update jsonpath to be valid #35

Closed
wants to merge 1 commit into from

Conversation

DmitryAnansky
Copy link
Contributor

@DmitryAnansky DmitryAnansky commented Sep 5, 2024

What/Why/How?

As we already have type validation in CLI and type for jsonPath criteria is align - we need to update it here as well.

            "allOf": [
                {
                    "if": {
                        "required": [
                            "type"
                        ],
                        "properties": {
                            "type": {
                                "const": "jsonpath"
                            }
                        }
                    },
                    "then": {
                        "properties": {
                            "version": {
                                "const": "draft-goessner-dispatch-jsonpath-00"
                            }
                        }
                    }
                },

Or out simplified version:

const JSONPathCriterion: NodeType = {
  properties: {
    type: { type: 'string', enum: ['jsonpath'] },
    version: { type: 'string', enum: ['draft-goessner-dispatch-jsonpath-00'] },
  },
};

Reference

DependsOn:

Testing

Screenshots (optional)

Check yourself

  • Code is linted
  • Tested with redoc/reference-docs/workflows (internal)
  • All new/updated code is covered with tests

Security

  • Security impact of change has been considered
  • Code follows company security practices and guidelines

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