Skip to content

V2: Automatically create a webhook parser #404

@Yang-33

Description

@Yang-33

When a new webhook type is added, it must be updated manually.

If we can prevent human errors, such as forgetting to update, that would be wonderful.

I believe this can be achieved in several ways, each being a realistic option:

  1. Write it with an OpenAPI generator
    • However, since the OpenAPI generator is not well-suited for this, it might require significant workarounds.
  2. Scan the generated code (https://github.com/line/line-bot-sdk-ruby/tree/38d89d155ed80f4ad12401be72da790bf000ee53/lib/line/bot/v2/webhook/model), create a complete mapping, and then generate the parser.
  3. Scan the webhook.yaml and implement it.
  4. Like our line-bot-sdk-python, create a parse function within the class that uses polymorphism.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions