Skip to content

feat: rename actions files, split source/resource calls, add utils#36

Merged
AlexAxthelm merged 6 commits intouse-ogsi-modelfrom
ogsi-db-rest
Mar 6, 2026
Merged

feat: rename actions files, split source/resource calls, add utils#36
AlexAxthelm merged 6 commits intouse-ogsi-modelfrom
ogsi-db-rest

Conversation

@mbarlow12
Copy link
Contributor

@mbarlow12 mbarlow12 commented Mar 6, 2026

Splits db actions into 2 repository-like files

  • og_field_resource_actions.py: interface for field resource operations
  • og_field_source_actions.py: interface for field source operations
  • tried to keep things as non-overlapping as possible, some operations for sources are exposed in the resource actions

Added utils.py to avoid a circular dependency.


Meant to add the rest in a separate PR.

Big one is that I opted to drop the "resources" endpoint in favor of "oil-gas-fields". We can revert if anyone loses their mind about it.

We also have the api/v1/oil-gas-field-sources that's for source-specific calls. Now, I didn't look into it, but I'm sure there's a way we can have a more generic sources subpath under/behind oil-gas-fields. So it might look like:

  • oil-gas-fields/sources - all sources (POST & GET)
  • oil-gas-fields/{id}/sources - all sources for id (POST for attach? & GET)

This would present a repeatable pattern of <resource type>/[{id}]/sources/..., <resource type>/merge, <resource type>/unmerge, etc... Food for thought 🤷

Base automatically changed from ogsi-db-models to use-ogsi-model March 6, 2026 08:57
@AlexAxthelm AlexAxthelm merged commit bfbbfa2 into use-ogsi-model Mar 6, 2026
@AlexAxthelm AlexAxthelm deleted the ogsi-db-rest branch March 6, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants