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: add request validator schema for http events #573

Merged
merged 2 commits into from
Sep 13, 2023

Conversation

paolorossig
Copy link
Contributor

It adds support for http request validators, same behavior as for functions http events.

The serverless definition is as follows:

stepFunctions:
  stateMachines:
    First:
      events:
        - http:
            path: path/to
            method: POST
            request:
              schemas:
                application/json: start-execution
                  name:  TestSchema
                  schema: ${file(schema.json)}
      definition:
        StartAt: Test
        States:
          ...
    

Closes #554

@horike37
Copy link
Collaborator

@paolorossig
Thank you for this PR. Looks good so far. And as the rest of the tasks, we have to write documentation.
Would you add an explanation of this feature in the Readme so that people know how to use this?

@paolorossig
Copy link
Contributor Author

@horike37 You are welcome! I just updated the README with the feature explanation of request validators with some examples.

@paolorossig
Copy link
Contributor Author

@horike37 did you have a chance to review the missing documentation of this pr?

@horike37
Copy link
Collaborator

@paolorossig
Sorry for being late. LGTM!

@horike37 horike37 merged commit 045b2e5 into serverless-operations:master Sep 13, 2023
1 check passed
@horike37
Copy link
Collaborator

🎉 This PR is included in version 3.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add request schema to an http event for the stepfunction for validation
2 participants