Skip to content

Conversation

@lexxamcode
Copy link
Member

@lexxamcode lexxamcode commented Oct 2, 2025

Resolves #31
This Pull Request adds support for the OGC API - Styles standard.

A library has been written that contains an object model for working with styles and style metadata, as well as controllers that can be integrated into an existing ASP.NET application.

New Endpoints:

  • GET /{collectionId}/styles returns styles associated with the collection

  • POST /{collectionId}/styles adds new style (or new stylesheet of the style) for the collection

  • PATCH /{collectionId}/styles updates default style for the associated collection

  • GET /{collectionId}/styles/{styleId} returns style info or stylesheet of the style if format is specified

  • PUT /{collectionId}/styles/{styleId} replaces existing stylesheet of the style

  • DELETE /{collectionId}/styles/{styleId} deletes style of the collection

  • GET /{collectionId}/styles/{styleId}/metadata returns metadata of the style

  • PUT /{collectionId}/styles/{styleId}/metadata replaces metadata of the style

  • PATCH /{collectionId}/styles/{styleId}/metadata updates metadata of the style

By default, styles are stored in the server's file system.
To change the way styles are stored, you need to implement IStyleStorage and IMetadataStorage.

@lexxamcode lexxamcode requested a review from kolyanch October 2, 2025 13:20
@lexxamcode lexxamcode self-assigned this Oct 2, 2025
@lexxamcode lexxamcode requested review from alxmcs and bam-samis October 6, 2025 14:28
Copy link
Member

@alxmcs alxmcs left a comment

Choose a reason for hiding this comment

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

nit: I would suggest adding summaries to public methods and classes.

Copy link
Contributor

@danlla danlla left a comment

Choose a reason for hiding this comment

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

Before merging:

  1. Add a new markdown file documenting the feature (e.g., docs/styles.md) and link it in docs/index.md.
  2. Include the new package in docs/installation.md.
  3. Add the new standard to the table in docs/overview.md.
  4. Update .github/workflows/publish-packages.yml to build and publish the new package.

Copy link
Member

@kolyanch kolyanch left a comment

Choose a reason for hiding this comment

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

The new controllers currently do not have any authorization. At least for style modification methods, they are necessary, otherwise the API will be susceptible to attacks.

@lexxamcode lexxamcode requested a review from bam-samis October 7, 2025 14:42
@lexxamcode lexxamcode requested a review from kolyanch October 7, 2025 15:05
@lexxamcode lexxamcode requested a review from kolyanch October 8, 2025 08:34
@kolyanch kolyanch merged commit 68d1df6 into sam-is:main Oct 10, 2025
1 check passed
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.

OGC API - Styles support

5 participants