[x] Limit required context for setting creation or make a way to provide context for the setting creation flow when needed.
Proposed changes (including videos or screenshots)
Added Comments for Code generation in all files which required changes for Setting Creation.
Added Script to automate Settings code creation by running python make_new_setting.py
After running the script you are prompted to enter a Setting type name followed by the required fields and their types. Enter done once all fields are added.
This will:
Add new setting type Enum
Add new setting dataclass
Add new validators
Add new adapters
Provide you with context where changes need to go 🥇
What you need to do:
Update imports for the new Setting dataclass (The script does not automaticallly imports as its more prone to errors)
Update what defaults you need for the setting fields.
Try using the APIs (Things should work 🎉 )
Update the boiler plate code if your setting needs it or is more complex and has non primitive types like uuids, some enums etc.
Linked Issue(s)
closes #432
Acceptance Criteria fulfillment
Proposed changes (including videos or screenshots)
python make_new_setting.py
https://github.com/middlewarehq/middleware/assets/70485812/7bc68757-cd66-4b9a-8ed5-f20f6e8bf0f6
Further comments