8000 New API: Don't hardcode metadata files extension · Issue #1333 · theupdateframework/python-tuf · GitHub
[go: up one dir, main page]

Skip to content
New API: Don't hardcode metadata files extension #1333
Open
@MVrachev

Description

@MVrachev

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 a Repository class or helper functions for each of the metadata classes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0