The module odp.api.models should be moved to the ODP core library. This would enable ODP client applications (such as the ODP admin and MIMS catalogue apps) to take advantage of server-tested Pydantic model validation when constructing requests to and interpreting responses from the ODP API.
In odp.api.models there are references to database enumeration types. DB code cannot be pulled into ODP core. The DB enum types in odp.db.models.types will need counterparts in odp.const. The values of the DB enums can be set to the corresponding values from the corresponding ODP enums. It makes sense to centralise the database enumeration string values in this way, because they're referenced in both client and server code.
The module
odp.api.models
should be moved to the ODP core library. This would enable ODP client applications (such as the ODP admin and MIMS catalogue apps) to take advantage of server-tested Pydantic model validation when constructing requests to and interpreting responses from the ODP API.In
odp.api.models
there are references to database enumeration types. DB code cannot be pulled into ODP core. The DB enum types inodp.db.models.types
will need counterparts inodp.const
. The values of the DB enums can be set to the corresponding values from the corresponding ODP enums. It makes sense to centralise the database enumeration string values in this way, because they're referenced in both client and server code.