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

Consider adjusting collection data sources default name #83

Open
austinvalle opened this issue Oct 23, 2023 · 0 comments
Open

Consider adjusting collection data sources default name #83

austinvalle opened this issue Oct 23, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@austinvalle
Copy link
Member

Background

After #78 added support for collection data sources (by automatically creating a root SetNested or Set attribute), we decided to automatically set the name of the attribute to be the same as the data source name.

This may not be desired if the data source name has multiple words like aws_secretsmanager_secrets.

Possible solutions

  • Adjust the attribute name to split on underscore and take the last word
  • Add a configuration option to the generator config to allow a custom name:

Example

data_sources:
  petmanager_pets:
    read:
      path: /pet/findByStatus
      method: GET
    schema:
      collection_name: pets 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant