-
Notifications
You must be signed in to change notification settings - Fork 26
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: add a placeholder README
file in codegen'd directory
#774
feat: add a placeholder README
file in codegen'd directory
#774
Conversation
Here's some additional info about the generated SDK: | ||
|
||
\`api\` version: ${PACKAGE_VERSION} | ||
Generated at ${new Date().toISOString()} |
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.
After #775 is merged in you should be able to grab the createdAt
date from the lockfile for this with this code:
storage.getFromLockfile().createdAt
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.
should be able to pull this in now that createdAt
has been added to the lockfile.
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.
sick
*/ | ||
createREADME() { | ||
let createdAt = new Date().toISOString(); | ||
const currentAPI = Storage.getLockfile().apis.find(api => api.identifier === this.identifier); |
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.
This is duplicating work in the getFromLockfile
storage instance method but this whole storage class is really becoming a bit of a pain with its mix of instance and static methods. You don't have a great way of accessing an instance of `storage though here so it's fine.
Maybe the whole storage class should just be refactored to be entirely static. 🤔
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.
yeah i noticed that getFromLockfile
method but wasn't able to get it working without some deeper refactors 😮💨
Maybe the whole storage class should just be refactored to be entirely static. 🤔
into this idea!
🧰 Changes
This PR enhances our SDK generation to automatically create placeholder
README.md
files in the codegen'd directories.As part of this, I made a few test enhancements so the
UPDATE_FIXTURES
env variable will now create any missing fixtures.🧬 QA & Testing
Does the copy look good? And do tests pass?