Skip to content

Commit

Permalink
Correct description of schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
JimMadge committed Oct 5, 2023
1 parent 3ca9172 commit ffa3b09
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,28 @@ We recognise the following major repositories and organisations may create `<rep
### Package list schema

Package lists are formatted as JSON.
Each file is a list of package entries with the following fields.
The schema for major repositories is formally described in [`schema.json`](./schema.json).
This is a [JSON Schema](https://json-schema.org/overview/what-is-jsonschema) document using the 2020-12 draft.

In brief, each file is a list of package entries with the following fields.

- `package_name` (text, case sensitive, uniquely defines a package for a repository)
- `version` (text, [PEP440 style](https://peps.python.org/pep-0440/#version-specifiers))
- `version` (text, comparison operator plus [PEP440 style](https://peps.python.org/pep-0440/#version-specifiers) version number)
- `approval_date` (ISO 8601)
- `revoke_date` (ISO 8601 or `null` if not revoked)

For example,

```JSON
[
{
"package_name": "numpy",
"version": "*",
"approval_date": "2023-09-29",
"revoke_date": null
}
{
"package_name": "numpy",
"version": "== 1.2.3",
"approval_date": "2023-09-29",
"revoke_date": null
}
]
```

Additionally for packages not in a major repository, _i.e._ those in `other.json`, a `url` field is added to uniquely identify the package and give its source.
The other schema is described in [`schema_other.json`](schema_other.json).

0 comments on commit ffa3b09

Please sign in to comment.