SAEON / odp-server

Source code for the SAEON Open Data Platform server components.
GNU Affero General Public License v3.0
0 stars 2 forks source link

Move API models to core #15

Closed marksparkza closed 8 months ago

marksparkza commented 9 months ago

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.