Skip to content

Commit 3ba6b90

Browse files
Derek Howerayosher
authored andcommitted
Fix broken manual generation, ensure it's tested in regression
Signed-off-by: Albert Yosher <[email protected]>
1 parent 8be0da3 commit 3ba6b90

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Rakefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ DESC
270270
task :regress do
271271
Rake::Task["idl_test"].invoke
272272
Rake::Task["validate"].invoke
273+
ENV["MANUAL_NAME"] = "isa"
274+
ENV["VERSIONS"] = "all"
275+
Rake::Task["gen:html_manual"].invoke
273276
Rake::Task["gen:html"].invoke("generic_rv64")
274277
Rake::Task["gen:crd_pdf"].invoke("MockCRD-1")
275278
Rake::Task["gen:crd_pdf"].invoke("MC-1")

backends/manual/templates/ext.adoc.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ This extension has the following implementation options:
6060
+
6161
--
6262
|===
63-
h| Type | <%= param.schema["type"] %>
64-
h| Valid Values | <%= Schema.new(param.schema).to_pretty_s %>
63+
h| Type | <%= param.schema.type_pretty %>
64+
h| Valid Values | <%= param.schema.to_pretty_s %>
6565
h| Description a| <%= param.desc %>
6666
|===
6767
--

lib/arch_obj_models/schema.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ def initialize(schema_hash)
1616
# @return [Hash] Hash representation of the JSON Schema
1717
def to_h = @schema_hash
1818

19+
# @return [String] Human-readable type of the schema (e.g., array, string, integer)
20+
def type_pretty
21+
@schema_hash["type"]
22+
end
23+
1924
# @return [String] A human-readable description of the schema
2025
def to_pretty_s(schema_hash = @schema_hash)
2126
raise ArgumentError, "Expecting hash" unless schema_hash.is_a?(Hash)

0 commit comments

Comments
 (0)