Skip to content

Add DRU routes - #165

Open
Florian-Katerndahl wants to merge 11 commits into
feature/eoapfrom
Florian-Katerndahl/feature/eoap
Open

Add DRU routes#165
Florian-Katerndahl wants to merge 11 commits into
feature/eoapfrom
Florian-Katerndahl/feature/eoap

Conversation

@Florian-Katerndahl

@Florian-Katerndahl Florian-Katerndahl commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Load service implementation eagerly instead of lazily. Otherwise the DRU routes are added only after the request to an already endpoint. Additionally, the routes needed for DRU are added by using an additional fastAPI-router which is attached to an fastapi app instance.

Checklist (strike out non-applicable):

* [ ] Changes documented in CHANGES.md
* [ ] Related issue exists and is referred to in the PR description and CHANGES.md

  • Added docstrings and API docs for any new/modified user-facing classes and functions
  • Changes/features documented in docs/*
    * [ ] Unit-tests adapted/added for changes/features
  • Test coverage remains or increases (target 100%)

Florian Katerndahl added 5 commits July 16, 2026 17:05
As of now, the service implementing a given interface is loaded
lazily upon the first request.

However, when keeping changes to existing code-base minimal and
loading DRU routes only when the actual service is loaded,
DRU routes become addressable only after contacting
an endpoint that is already exposed by OGC API - Processes Part 1.

Directly loading a service on startup remedies this undesirable
behavior. This change allows for `main.py` and `routes.py`
to be left unchanged.
- Define DRU routes based on the DRUService interface with
  corresponding response classes and documentation of additional
  responses (both successful and error cases) for fastapi,
  using a distinct fastapi router instance
- Define custom response class is used to correctly set the
  content type field of the server response
@Florian-Katerndahl Florian-Katerndahl changed the title Florian katerndahl/feature/eoap Add DRU routes Jul 17, 2026
@forman

forman commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Please see applicable #168

@forman

forman commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Why do you think that most of the PR checklist items are non-applicable?

@Florian-Katerndahl

Copy link
Copy Markdown
Collaborator Author

Because the PR, apart form the injection, doesn't add code that I thought of being worth getting tested or that needed updates to the documentation. Of course, this can be changed again, if wanted.

@forman forman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

But please stick to one notion; see also ApiError (in core models), not APIError.

  • ogcapppkg_response.py --> ap_response.py, and why a separate file at all?
  • {processID} --> {processId}
  • DRUService --> DruService`

@Florian-Katerndahl

Copy link
Copy Markdown
Collaborator Author

Addressed the comments, test cases are still not really possible since there's no implementation of a DRU compliant server in the eozilla repo.

I'll also add other reviewer so this won't get blocked.

@Florian-Katerndahl
Florian-Katerndahl marked this pull request as ready for review July 29, 2026 08:05
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