Skip to content

Feature request: provide scoped subpath exports for schemas & envelopes #2829

Closed
@dreamorosi

Description

@dreamorosi

Use case

The Parser utility has a number of built-in schemas and envelopes that customers can use in their functions. Currently, all of these except two are exposed via a barrel file @aws-lambda-powertools/parser/schemas.

We should work towards exporting each category of schemas and envelopes on a per-service basis via dedicated exports.

Solution/User Experience

Customers should be able to import any given schema or envelope using a targeted export, for example, all the API Gateway-related schemas should be available under the @aws-lambda-powertools/parser/schemas/api-gateway export and all the S3 ones under @aws-lambda-powertools/parser/schemas/s3, the same applies to envelopes which would have, for example, SQS envelopes under @aws-lambda-powertools/parser/envelopes/sqs.

With this change, customers would be able to have a slimmer bundle since they'd be importing only the schemas/envelopes of the category they're actually using instead of all of them.

Alternative solutions

No response

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

Metadata

Metadata

Assignees

Labels

completedThis item is complete and has been merged/shippedfeature-requestThis item refers to a feature request for an existing or new utilityparserThis item relates to the Parser Utility

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions