Skip to content

Commit 3c7892e

Browse files
committed
Switches to latest, updates API
1 parent e0755a1 commit 3c7892e

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

ProjectPlugins/CodexPlugin/ApiChecker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace CodexPlugin
1010
public class ApiChecker
1111
{
1212
// <INSERT-OPENAPI-YAML-HASH>
13-
private const string OpenApiYamlHash = "09-53-C3-A6-31-A5-0C-8B-53-1C-3D-C7-2B-1E-85-C7-17-60-54-43-01-C4-49-4E-D9-68-35-7D-F7-41-13-B5";
13+
private const string OpenApiYamlHash = "34-B5-DA-26-40-76-B8-D8-8E-7D-9C-17-85-C6-B0-63-55-8D-C6-01-0B-96-BB-7C-BD-53-E5-32-07-ED-29-92";
1414
private const string OpenApiFilePath = "/codex/openapi.yaml";
1515
private const string DisableEnvironmentVariable = "CODEXPLUGIN_DISABLE_APICHECK";
1616

ProjectPlugins/CodexPlugin/CodexContainerRecipe.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace CodexPlugin
77
{
88
public class CodexContainerRecipe : ContainerRecipeFactory
99
{
10-
private const string DefaultDockerImage = "codexstorage/nim-codex:0.1.8-dist-tests";
10+
private const string DefaultDockerImage = "codexstorage/nim-codex:latest-dist-tests";
1111
public const string ApiPortTag = "codex_api_port";
1212
public const string ListenPortTag = "codex_listen_port";
1313
public const string MetricsPortTag = "codex_metrics_port";

ProjectPlugins/CodexPlugin/Mapper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ private Manifest MapManifest(CodexOpenApi.ManifestItem manifest)
182182
return new Manifest
183183
{
184184
BlockSize = new ByteSize(Convert.ToInt64(manifest.BlockSize)),
185-
OriginalBytes = new ByteSize(Convert.ToInt64(manifest.OriginalBytes)),
186-
RootHash = manifest.RootHash,
185+
OriginalBytes = new ByteSize(Convert.ToInt64(manifest.DatasetSize)),
186+
RootHash = manifest.TreeCid,
187187
Protected = manifest.Protected
188188
};
189189
}

ProjectPlugins/CodexPlugin/openapi.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,10 @@ components:
344344
ManifestItem:
345345
type: object
346346
properties:
347-
rootHash:
347+
treeCid:
348348
$ref: "#/components/schemas/Cid"
349-
description: "Root hash of the content"
350-
originalBytes:
349+
description: "Unique data identifier"
350+
datasetSize:
351351
type: integer
352352
format: int64
353353
description: "Length of original content in bytes"
@@ -359,15 +359,18 @@ components:
359359
description: "Indicates if content is protected by erasure-coding"
360360
filename:
361361
type: string
362+
nullable: true
362363
description: "The original name of the uploaded content (optional)"
363364
example: codex.png
364365
mimetype:
365366
type: string
367+
nullable: true
366368
description: "The original mimetype of the uploaded content (optional)"
367369
example: image/png
368370
uploadedAt:
369371
type: integer
370372
format: int64
373+
nullable: true
371374
description: "The UTC upload timestamp in seconds"
372375
example: 1729244192
373376

Tools/BiblioTech/CodexCidChecker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private CheckResponse SuccessMessage(DataItem content)
6666
success: true,
6767
title: $"Success: '{content.Cid}'",
6868
error: "",
69-
$"size: {content.Manifest.OriginalBytes} bytes",
69+
$"size: {content.Manifest.DatasetSize} bytes",
7070
$"blockSize: {content.Manifest.BlockSize} bytes",
7171
$"protected: {content.Manifest.Protected}"
7272
);

0 commit comments

Comments
 (0)