dance-engine / dance-engine/the-engine

datamode-code-generator enhancements

Open
#33 0 comments 0 reactions 1 assignee Claimed by @connorkm2 View on GitHub
bug
Dominant language
Python
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Import the [fork of data model-code-generator](https://github.com/connorkm2/datamodel-code-generator) to dance-engine.

Update the code so that if a schema is referred to inside one schema has a different `x-internal-group` then the definition of it should be repeated, or it should be automatically imported from the file it is expected to be in.

---
The example which triggered this is that an Event will have an optional field which is Items. This can be used to create Items at the same time as creating an event, or it will be used when returning an event in detail. However when referencing this in the definition of the `EventObject` schema:

```
items:
type: array
items:
$ref: "#/components/schemas/ItemObject"
```
this will create a reference in the pydantic model inside `events_models.py` to the `ItemObject` defined inside of `items_models.py` but the import is not being made automatically.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.