Skip to content
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

ZIP File bug #112

Closed
jkHCBB opened this issue Dec 12, 2023 · 4 comments
Closed

ZIP File bug #112

jkHCBB opened this issue Dec 12, 2023 · 4 comments

Comments

@jkHCBB
Copy link

jkHCBB commented Dec 12, 2023

Hey all I'm running into an issue with zip folders.

When run locally without being in a zip folder, The JSON file that is being passed in the zip will pass as valid JSON. "Input JSON is valid."
cms-mrf-validator validate ValidINNFile.json --schema-version v1.0.0 -o inntest.txt -y

When passing the JSON file to the validator in a zip folder by using the from-url option the validator is failing and returning "Input is not a valid JSON Error(offset 0): Invalid value.".
cms-mrf-validator from-url "https://hcbbmrfprod.blob.core.windows.net/mrf/External/2023-11-16_Trustmark-Health-Benefits-541759962_in_network_rates.zip" --schema-version v1.0.0 -o ziptest.txt -y

When run locally if you pass the valid JSON file in a zip folder to the validator it will fail and return "Input is not a valid JSON Error(offset 0): Invalid value.".
cms-mrf-validator validate ValidFileZipped.zip --schema-version v1.0.0 -o ziptest.txt -y

Thank you.

Context Update:
When downloading an MRF from a URL for the validator if the content type is application/octet-stream the file will run properly in the validator.

When downloading an MRF from a URL for the validator that has a content type of application/x-zip-compressed, the validator will return that the file is not valid JSON even if it is.

@jkHCBB jkHCBB changed the title ZIP File from-url bug ZIP File bug Dec 12, 2023
@jkHCBB
Copy link
Author

jkHCBB commented Jan 8, 2024

Hey team, Any updates on if this will be resolved?

@shaselton-usds
Copy link
Collaborator

Hi @jkHCBB

Thanks for the follow up details. We're taking a look at it - hope to having something soon for you.

@shaselton-usds
Copy link
Collaborator

Hey @jkHCBB -- I appreciate your patience. We just merged a PR: #113 that should hopefully address the behavior you were running into.

A new release has been cut to NPM so you can pull down the latest there.

Thank you again for the detailed information. Please keep them coming as you happen to encounter them :).

@jkHCBB
Copy link
Author

jkHCBB commented Jan 9, 2024

Thanks again for all you do!

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

No branches or pull requests

2 participants