-
Notifications
You must be signed in to change notification settings - Fork 39
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: otter sdk training - model extension #2411
base: feat/otter-training
Are you sure you want to change the base?
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 5ab818f. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
79fbfac
to
5ab818f
Compare
const reviver = <T extends MyModel = MyModel>(data: any, dictionaries?: any) => { | ||
const revivedData = baseRevive<MyModelCoreIfy<T>>(data, dictionaries); | ||
/* Set the value of your new fields here */ | ||
// EXAMPLE: revivedData.myNewField = 'fake value'; |
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.
I think the Example should come from the instructions and not just something to uncomment
Ensure that the global property <code>allowModelExtension</code> has been set to <b>true</b>. This will guarantee that the revivers of the | ||
base models are generated, which is essential for the following exercise. | ||
</p> | ||
|
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.
It is a bit weird - we say that they should run commands as it is essential for the following exercise but we do it for them.
Maybe, we should be clearer:
You will be working with an sdk which has been generated with the .... option etc.
This way we make it clearer that they will need to do it if they want a local run or use it in their project
const revivedData = baseRevive<FlightCoreIfy<T>>(data, dictionaries); | ||
/* Set the value of your new fields here */ | ||
revivedData.id = 'sampleIdValue'; | ||
return revivedData; |
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.
It could be nice to show the id somewhere in a ui?
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.
But they won't get the autocompletion :/ - at least the compiler should complain
Proposed change
Otter SDK Training - Model extension
NOTE: the exercise and solution files are combined with the existing training-sdk
Related issues
- No issue associated -