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

Inconsistency in object names #23

Open
BenediktBergmann opened this issue Aug 22, 2022 · 2 comments
Open

Inconsistency in object names #23

BenediktBergmann opened this issue Aug 22, 2022 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@BenediktBergmann
Copy link

When dataverse-gen runs and creates the typings for a table there are 3 objects created in the entities ts file (Metadata, Attributes and the entity itself).
There is an inconsistency in this naming. The Metadata object is in camalCase where as the other two are in PascalCase.
If you for example generate the typings for Account you will get the following objects/definitions:

  • accountMetadata
  • AccountAttributes
  • Account

I think they should be named the same way.

@scottdurow
Copy link
Owner

Thanks for this @BenediktBergmann - this is a topic that I've wrestled with myself whilst writing dataverse-ify. The problem is of course that Dataverse uses Pascale Case for the SchemaNames - whilst it's standard practice to use camcelCase in TypeScript. I agree consistency should be a priority.
For backward compact - perhaps a flag is needed to control this otherwise it'll break any existing imports after re-generating the metadata.

@BenediktBergmann
Copy link
Author

I do agree. This is maybe a case where naming standards of C# (Back-End) and TS/JS (Front-End) do colide.

I think a flag to make it backward compatible sounds great.

@scottdurow scottdurow added the help wanted Extra attention is needed label Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants