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

Inconsistent capitalisation of classnames for inputs in auto-generated code. #122

Closed
tom-homewood-dyson opened this issue Feb 20, 2019 · 3 comments
Assignees
Labels
bug Something isn't working closing-soon codegen pending-response Issue is pending response from the issue requestor

Comments

@tom-homewood-dyson
Copy link

Describe the bug
Capitalisation of class names generated by InputTypeSpecBuilder is not consistent with the names used in import statements in other classes.

To Reproduce

  1. Create an Appsync API with a schema containing an input as follows:
input foo_bar {
	timestamp: Float!
	value: Float!
}
  1. Add a mutation to the schema as follows:
type Mutation {
	updateStuff(foo: foo_bar): Stuff
	...
        ...
}
  1. Attach the API to the project and build. Amplify Codegen will create files for the input (Foo_bar) and the mutation (UpdateStuffMutation).

  2. The build will fail due to the UpdateStuffMutation incorrectly referencing the input as follows:

import type.foo_bar;

Which AWS service(s) are affected?
Appsync / Amplify codegen (not sure where the actual bug is)

Expected behavior
The import statement in the mutation class file is capitalised to match the name of the input class file, as below:

import type.Foo_bar;

Environment Information (please complete the following information):

  • AWS Android SDK Version: [e.g. 2.7.6].
  • Device: N/A (app will not compile).
  • Android Version: App will not compile but compileSdkVersion = 28
  • Specific to simulators: No

(I'm aware that using underscore in input and type names is probably not the best idea, but nevertheless this inconsistent capitalisation is still a bug).

@scb01
Copy link
Contributor

scb01 commented Feb 25, 2019

@tom-homewood-dyson

Thanks for bringing this issue to my attention. I am looking into this and will post an update here once I have more information.

@desokroshan
Copy link
Contributor

This should have been fixed with version 2.8.3 of the SDK. Could you please upgrade and confirm @tom-homewood-dyson.

@desokroshan desokroshan added pending-response Issue is pending response from the issue requestor closing-soon labels May 9, 2019
@stale
Copy link

stale bot commented May 16, 2019

This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.

@stale stale bot closed this as completed May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working closing-soon codegen pending-response Issue is pending response from the issue requestor
Projects
None yet
Development

No branches or pull requests

5 participants