1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00
nix/doc/manual/source/protocols/json/store-object-info.md
John Ericson 6280905638 Convert store path info JSON docs to formal JSON Schema, and test
This continues the work for formalizing our current JSON docs. Note that
in the process, a few bugs were caught:

 - `closureSize` was repeated twice, forgot `closureDownloadSize`

 - `file*` fields should be `download*`. They are in fact called that in
   the line-oriented `.narinfo` file, but were renamed in the JSON
   format.
2025-10-28 23:28:16 -04:00

45 lines
796 B
Markdown

{{#include store-object-info-v1-fixed.md}}
## Examples
### Minimal store object (content-addressed)
```json
{{#include schema/store-object-info-v1/pure.json}}
```
### Store object with impure fields
```json
{{#include schema/store-object-info-v1/impure.json}}
```
### Minimal store object (empty)
```json
{{#include schema/store-object-info-v1/empty_pure.json}}
```
### Store object with all impure fields
```json
{{#include schema/store-object-info-v1/empty_impure.json}}
```
### NAR info (minimal)
```json
{{#include schema/nar-info-v1/pure.json}}
```
### NAR info (with binary cache fields)
```json
{{#include schema/nar-info-v1/impure.json}}
```
<!-- need to convert YAML to JSON first
## Raw Schema
[JSON Schema for Store Object Info v1](schema/store-object-info-v1.json)
-->