Skip to content

Conversation

paulfouquet
Copy link
Contributor

Description

Add an option --fix-content-type in format-json (previously pretty-print) to force the content-type to be updated for json s3 objects.

Intention

Some of the STAC files (Item) have a content-type set to application/json instead of application/geo+json.

Checklist

If not applicable, provide explanation of why.

  • Tests updated: no tests for aws objects
  • Docs updated
  • Issue linked in Title

Co-authored-by: Alice Fage <[email protected]>
amfage
amfage previously approved these changes Sep 14, 2023
README.md Outdated

```bash
pretty-print source/
format-json source/ [--fix-content-type]
Copy link
Member

Choose a reason for hiding this comment

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

How come the name change? prettier will format a lot more than json. eg markdown, yaml, javascript etc..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because it's looking for json files atm. I can make the function more generic and look at other file format but I feel it will need a bit more work, specially around the --fix-content-type

Copy link
Member

Choose a reason for hiding this comment

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

This is a breaking change to rename it, so Id prefer to leave it as is if we can?


```bash
pretty-print source/
pretty-print source/ [--fix-content-type]
Copy link
Contributor

Choose a reason for hiding this comment

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

The flag should be before the directory.

Copy link
Contributor

@l0b0 l0b0 left a comment

Choose a reason for hiding this comment

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

Other than a minor nit this looks good.

@paulfouquet paulfouquet marked this pull request as draft December 10, 2024 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants