Skip to content

feat: new ingestion endpoint#57

Open
vitaligi wants to merge 1 commit into
alphafrom
feat/modified-ingestion-openapi
Open

feat: new ingestion endpoint#57
vitaligi wants to merge 1 commit into
alphafrom
feat/modified-ingestion-openapi

Conversation

@vitaligi

Copy link
Copy Markdown
Contributor
Question Answer
Bug fix
New feature
Breaking change
Deprecations
Documentation
Tests added
Chore
  • added new api endpoint for handling new ingestion design (huge ingestion). it introduces /datasets endpoint with PUT action. it will act as an upsert on the ingested (multi)polygons into the new (planned) datasets resource (history).

@vitaligi vitaligi force-pushed the feat/modified-ingestion-openapi branch from 841ced9 to 4e64110 Compare November 23, 2025 12:53
@razbroc razbroc changed the title feat: new ignestion endpoint feat: new ingestion endpoint Nov 25, 2025
@razbroc razbroc requested a review from Copilot November 25, 2025 08:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new ingestion endpoint /datasets/{id} with a PUT operation to support a new "huge ingestion" design. The endpoint performs an upsert operation on validated datasets (multi-polygons) into a planned datasets resource with history tracking.

Key Changes:

  • Added PUT endpoint /datasets/{id} for upserting validated datasets by entity name
  • Returns 201 (Created) with Location header for new resources, or 204 (No Content) for updates
  • Includes standard error responses (400, 404, 500) consistent with existing API patterns

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread openapi3.yaml
summary: >
Insert validated datasets into datasets
description: >
Insert validated datasets into datasets by an id (entity name), creating the resource if it did not existed (upsert).

Copilot AI Nov 25, 2025

Copy link

Choose a reason for hiding this comment

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

Grammar error: "existed" should be "exist". The correct phrasing is "if it did not exist" (present tense after "did not").

Suggested change
Insert validated datasets into datasets by an id (entity name), creating the resource if it did not existed (upsert).
Insert validated datasets into datasets by an id (entity name), creating the resource if it did not exist (upsert).

Copilot uses AI. Check for mistakes.
Comment thread openapi3.yaml
description: Created
headers:
Location:
description: URL of the newly created user resource

Copilot AI Nov 25, 2025

Copy link

Choose a reason for hiding this comment

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

The description says "URL of the newly created user resource" but this endpoint creates a dataset resource, not a user resource. This should be "URL of the newly created dataset resource".

Suggested change
description: URL of the newly created user resource
description: URL of the newly created dataset resource

Copilot uses AI. Check for mistakes.
Comment thread openapi3.yaml
description: Entity name identifying the resource
schema:
$ref: './SchemaRaster/core/polygon-parts.yaml#/components/schemas/PolygonPartsEntityName'
required: true

Copilot AI Nov 25, 2025

Copy link

Choose a reason for hiding this comment

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

The PUT endpoint is missing a requestBody definition. According to the description, this endpoint inserts validated datasets, which suggests data needs to be sent in the request body. All other POST and PUT endpoints in this API (e.g., /polygonParts, /polygonParts/validate) define a requestBody with the required schema. Please add a requestBody specification with the appropriate schema reference and content type.

Suggested change
required: true
required: true
requestBody:
description: Validated dataset payload
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ValidatedDatasetPayload'

Copilot uses AI. Check for mistakes.
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