Skip to content

Conversation

@KatKatKateryna
Copy link

@KatKatKateryna KatKatKateryna commented Dec 19, 2025

Overview

This PR is fixing the behavior of overwriting example-config.yaml via admin API. Currently, the data is received correctly but YAML writer is representing datetime objects and special characters incorrectly:
image

image

To fix this, YAML writer now has 'allow_unicode=True' and 'Dumper=MyDumper', where MyDumper is an instance of yaml.SafeDumper with correct datetime object representers.

Related Issue / discussion

This was discovered while working on QGIS pygeoapi-config plugin: correctly sent data is being saved incorrectly on the running pygeoapi instance: byteroad/pygeoapi_config#12

Additional information

Dependency policy (RFC2)

  • I have ensured that this PR meets RFC2 requirements

Updates to public demo

Contributions and licensing

(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)

  • I'd like to contribute [feature X|bugfix Y|docs|something else] to pygeoapi. I confirm that my contributions to pygeoapi will be compatible with the pygeoapi license guidelines at the time of contribution
  • I have already previously agreed to the pygeoapi Contributions and Licensing Guidelines

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.

1 participant