-
Notifications
You must be signed in to change notification settings - Fork 69
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
feat(open-api-gateway): idomatic smithy project structure for better IDE support #280
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit ccddc4c. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 2 targetsSent with 💌 from NxCloud. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to add auto-migration capabilities - thinking for the model folder move would be great. More curious from how we can handle migrations in general for packages that this particularly since quite minimal. Nothing have to do now, but could be a nice simple example to attempt 😄
113a2a9
to
a366643
Compare
This would be super cool, but is a little bit fiddly to do properly as we'd need to parse the old |
packages/open-api-gateway/src/project/smithy/components/sample-executable.ts
Outdated
Show resolved
Hide resolved
packages/open-api-gateway/src/project/smithy/components/sample-executable.ts
Outdated
Show resolved
Hide resolved
…ide support This change restructures the smithy-based projects to combine the `model` and `smithy-build` directories into a single `smithy` directory. This directory has a more similar structure to those found in the Smithy documentation, and in turn means that IDE tools can be more easily configured to help with the developer experience. Specifically with this change, the Smithy IntelliJ plugin can be used to enhance the development experience when authoring models. https://github.com/iancaffey/smithy-intellij-plugin We preserve the behaviour of abstracting away the gradle wrapper, whereby it is ignored from the generated project's source control by default, and copied from the PDK if it does not already exist. Similarly we allow users to bring their own `gradle wrapper` by choosing not to ignore it in source control, and placing it in the `smithy` directory. This replaces the `gradleWrapperPath` configuration option. While this is a breaking change, the migration steps are fairly straightforward: - Upgrade the open-api-gateway package - `npx projen` to regenerate code - notice the new `smithy` folder in your api project - Copy the contents of the old `model` directory into `smithy/src/main/smithy` - If any custom dependencies were added to the `smithy-build/build.gradle` file, add them to `smithy/build.gradle` - Delete the old `model` and `smithy-build` directories BREAKING CHANGE: Moved the location of the smithy model from 'model' to 'smithy/src/main/smithy'. Removed the gradleWrapperPath configuration option. fix #278
a366643
to
7049544
Compare
…ide support (aws#280) This change restructures the smithy-based projects to combine the `model` and `smithy-build` directories into a single `smithy` directory. This directory has a more similar structure to those found in the Smithy documentation, and in turn means that IDE tools can be more easily configured to help with the developer experience. Specifically with this change, the Smithy IntelliJ plugin can be used to enhance the development experience when authoring models. https://github.com/iancaffey/smithy-intellij-plugin We preserve the behaviour of abstracting away the gradle wrapper, whereby it is ignored from the generated project's source control by default, and copied from the PDK if it does not already exist. Similarly we allow users to bring their own `gradle wrapper` by choosing not to ignore it in source control, and placing it in the `smithy` directory. This replaces the `gradleWrapperPath` configuration option. While this is a breaking change, the migration steps are fairly straightforward: - Upgrade the open-api-gateway package - `npx projen` to regenerate code - notice the new `smithy` folder in your api project - Copy the contents of the old `model` directory into `smithy/src/main/smithy` - If any custom dependencies were added to the `smithy-build/build.gradle` file, add them to `smithy/build.gradle` - Delete the old `model` and `smithy-build` directories BREAKING CHANGE: Moved the location of the smithy model from 'model' to 'smithy/src/main/smithy'. Removed the gradleWrapperPath configuration option. fix aws#278
This change restructures the smithy-based projects to combine the
model
andsmithy-build
directories into a singlesmithy
directory. This directory has a more similar structure to those found in the Smithy documentation, and in turn means that IDE tools can be more easily configured to help with the developer experience.Specifically with this change, the Smithy IntelliJ plugin can be used to enhance the development experience when authoring models. https://github.com/iancaffey/smithy-intellij-plugin
We preserve the behaviour of abstracting away the gradle wrapper, whereby it is ignored from the generated project's source control by default, and copied from the PDK if it does not already exist. Similarly we allow users to bring their own
gradle wrapper
by choosing not to ignore it in source control, and placing it in thesmithy
directory. This replaces thegradleWrapperPath
configuration option.While this is a breaking change, the migration steps are fairly straightforward:
npx projen
to regenerate code - notice the newsmithy
folder in your api projectmodel
directory intosmithy/src/main/smithy
smithy-build/build.gradle
file, add them tosmithy/build.gradle
model
andsmithy-build
directoriesBREAKING CHANGE: Moved the location of the smithy model from 'model' to 'smithy/src/main/smithy'. Removed the gradleWrapperPath configuration option.
fix #278