Open
Description
Description of issue or feature request:
In a review of a pr adding additional classes in the metadata API, @sechkova noticed that we have hardcoded
the usage of JSON files representing our metadata files after the implementation of abstract (de)serializer here.
For context: Teodoras comment
Current behavior:
Hardcoded *.json
file names in a lot of places: https://github.com/theupdateframework/tuf/blob/52207862008cc54db8a43e1543a653be0d0333f7/tuf/api/metadata.py#L468
Expected behavior:
Don't hardcode the file names representing our metadata files with their file extensions.
TODO:
- Remove hardcoded
json
strings from the code in all classes. - Fix our documentation to not give examples with JSON files or have a sentence like
For JSON metadata files, here is how it will look like...
- Add support for other metadata file types inside the metadata classes.
This could be achieved with a configuration option in aRepository
class or helper functions for each of the metadata classes.