Skip to content

Commit

Permalink
add schema version to index
Browse files Browse the repository at this point in the history
  • Loading branch information
ezekg committed Dec 21, 2024
1 parent ca6cc61 commit 2c62297
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/oci_image_layout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,16 @@ def initialize(io, **)

class Index < Blob
attr_reader :media_type,
:manifests
:manifests,
:version

def initialize(io, fs:, **)
data = JSON.parse(io.read)
media_type = data['mediaType']

super(io, media_type:, fs:, **)

@version = data['schemaVersion']
@manifests = data['manifests'].map do |manifest|
Manifest.from_json(manifest, fs:)
end
Expand Down

0 comments on commit 2c62297

Please sign in to comment.