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

Add support for webhooks #47

Merged
merged 7 commits into from
May 15, 2024
Merged

Add support for webhooks #47

merged 7 commits into from
May 15, 2024

Conversation

eranelbaz
Copy link
Member

Add support to generate openapi with webhooks property
It will search for it

custom:
  documentation:
    webhooks:
      webhookName:
        post:
          requestBody:
            description: |
              This is a request body description
          responses:
            200:
              description: |
                This is a expected response description

@eranelbaz eranelbaz changed the title Add support to webhooks Add support for webhooks May 15, 2024
@roni-frantchi
Copy link
Contributor

Thanks for contributing @eranelbaz - can you please add a descriptive entry in the readme as to how this works?
An example of not just the input - but also what would be produced and when it should be used.
See other features for example

Comment on lines 1 to 7
import type Serverless from "serverless";
import fs from "fs";
import yaml from "js-yaml";
import {SchemaGenerator, createGenerator} from "ts-json-schema-generator";
import {upperFirst, camelCase, mergeWith, set, isArray, get, isEmpty, kebabCase} from "lodash" ;
import {ApiGatewayEvent} from "serverless/plugins/aws/package/compile/events/apiGateway/lib/validate";
import { mapKeysDeep, mapValuesDeep} from 'deepdash/standalone'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eranelbaz please clear this PR from all style changes or changes not related to the proposed feature

Copy link
Contributor

@roni-frantchi roni-frantchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@roni-frantchi
Copy link
Contributor

@eranelbaz please attend to this before merging - also see test failures

@eranelbaz
Copy link
Member Author

Fixed test + added reamde

@eranelbaz eranelbaz merged commit 872d31d into env0:main May 15, 2024
1 check passed
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.

2 participants