-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add optional --fix-content-type TDE-859 #655
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Alice Fage <afage@linz.govt.nz>
README.md
Outdated
|
||
#### Example | ||
|
||
- Format and overwrite files: | ||
|
||
```bash | ||
pretty-print source/ | ||
format-json source/ [--fix-content-type] |
There was a problem hiding this comment.
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..
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
|
||
#### Example | ||
|
||
- Format and overwrite files: | ||
|
||
```bash | ||
pretty-print source/ | ||
pretty-print source/ [--fix-content-type] |
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
Description
Add an option
--fix-content-type
informat-json
(previouslypretty-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 toapplication/json
instead ofapplication/geo+json
.Checklist
If not applicable, provide explanation of why.