Skip to content

Commit 516874a

Browse files
author
Derek Hower
committed
Fix broken manual generation, ensure it's tested in regression
1 parent df19c54 commit 516874a

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
@@ -269,6 +269,9 @@ DESC
269269
task :regress do
270270
Rake::Task["idl_test"].invoke
271271
Rake::Task["validate"].invoke
272+
ENV["MANUAL_NAME"] = "isa"
273+
ENV["VERSIONS"] = "all"
274+
Rake::Task["gen:html_manual"].invoke
272275
Rake::Task["gen:html"].invoke("generic_rv64")
273276
Rake::Task["gen:crd_pdf"].invoke("MockCRD-1")
274277
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)