litestar-org / litestar-org/polyfactory
Enhancement: factory from json schema
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 120
- PR merge metrics
- No merged PRs in 30d
Description
### Summary
Hiya strangers,
I work a lot with schemas these days, and its in general a pain to generate good quality values for them. Polyfactory is a great option for this.
### Basic Example
```python
from referencing.jsonschema import DRAFT202012
class MySchemaFactory(SchemaFactory[DRAFT202012]):
__schema__ = "schemas/my_schema.yaml"
```
### Drawbacks and Impact
None to my knowledge. Its possible not to use `referencing` for this, but this library is used in `jsonschema` as well. So I think its a good dependency.
### Unresolved questions
Nope
Contributor guide
Research direction
No repository files or tests are named. Start by reviewing the existing factory abstractions and the referencing.jsonschema integration mentioned in the proposal; done should include a SchemaFactory that can use a schema path such as schemas/my_schema.yaml to generate valid values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100