Skip to content

Commit 12c70f3

Browse files
authored
Clean up json schema descriptions and generated documentation (#311)
The json schema contained several spurious space, astrix and other bit of text. Removing these makes the documentation much easier to read.
1 parent 34d41b2 commit 12c70f3

File tree

109 files changed

+427
-677
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+427
-677
lines changed

codegen/generators/java.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ def format_description(raw_description, indent_string: '')
1515
.split("\n")
1616
.map(&:strip)
1717
.reject { |line| line == '*' }
18-
.map { |line| " * #{line}".rstrip }
18+
.map { |line| line.rstrip }
19+
.map { |line| line.empty? ? "<p>" : line }
20+
.map { |line| " * #{line}"}
1921
.join("\n#{indent_string}")
2022
end
2123

codegen/templates/java.java.erb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ import static java.util.Collections.unmodifiableList;
1010
import static java.util.Objects.requireNonNull;
1111

1212
/**
13-
* Represents the <%= class_name(key) %> message in Cucumber's message protocol
14-
* @see <a href=https://github.com/cucumber/messages>Github - Cucumber - Messages</a>
13+
* Represents the <%= class_name(key) %> message in <a href=https://github.com/cucumber/messages>Cucumber's message protocol</a>
1514
<%- unless (schema['description'] || []).empty? -%>
16-
*
15+
* <p>
1716
<%= format_description(schema['description'], indent_string: '') %>
1817
<%- end -%>
1918
*/

cpp/include/messages/cucumber/messages/attachment.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ using json = nlohmann::json;
1818
// Represents the Attachment message in Cucumber's message protocol
1919
// @see <a href=https://github.com/cucumber/messages>Github - Cucumber - Messages</a>
2020
//
21-
// //// Attachments (parse errors, execution errors, screenshots, links...)
21+
// Attachments (parse errors, execution errors, screenshots, links...)
2222
//
2323
// An attachment represents any kind of data associated with a line in a
2424
// [Source](#io.cucumber.messages.Source) file. It can be used for:

cpp/include/messages/cucumber/messages/envelope.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@ using json = nlohmann::json;
3434
// Represents the Envelope message in Cucumber's message protocol
3535
// @see <a href=https://github.com/cucumber/messages>Github - Cucumber - Messages</a>
3636
//
37-
// When removing a field, replace it with reserved, rather than deleting the line.
38-
// When adding a field, add it to the end and increment the number by one.
39-
// See https://developers.google.com/protocol-buffers/docs/proto#updating for details
40-
//
41-
// All the messages that are passed between different components/processes are Envelope
42-
// messages.
43-
//
4437
// Generated code
4538

4639
struct envelope

cpp/include/messages/cucumber/messages/pickle.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ using json = nlohmann::json;
1717
// Represents the Pickle message in Cucumber's message protocol
1818
// @see <a href=https://github.com/cucumber/messages>Github - Cucumber - Messages</a>
1919
//
20-
// //// Pickles
21-
//
2220
// A `Pickle` represents a template for a `TestCase`. It is typically derived
2321
// from another format, such as [GherkinDocument](#io.cucumber.messages.GherkinDocument).
2422
// In the future a `Pickle` may be derived from other formats such as Markdown or

cpp/include/messages/cucumber/messages/source.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ using json = nlohmann::json;
1616
// Represents the Source message in Cucumber's message protocol
1717
// @see <a href=https://github.com/cucumber/messages>Github - Cucumber - Messages</a>
1818
//
19-
// //// Source
20-
//
2119
// A source file, typically a Gherkin document or Java/Ruby/JavaScript source code
2220
//
2321
// Generated code

cpp/include/messages/cucumber/messages/test_case.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ using json = nlohmann::json;
1616
// Represents the TestCase message in Cucumber's message protocol
1717
// @see <a href=https://github.com/cucumber/messages>Github - Cucumber - Messages</a>
1818
//
19-
// //// TestCases
20-
//
2119
// A `TestCase` contains a sequence of `TestStep`s.
2220
//
2321
// Generated code

dotnet/Cucumber.Messages/generated/Attachment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace Io.Cucumber.Messages.Types;
1313
* Represents the Attachment message in Cucumber's message protocol
1414
* @see <a href="https://github.com/cucumber/messages" >Github - Cucumber - Messages</a>
1515
*
16-
* //// Attachments (parse errors, execution errors, screenshots, links...)
16+
* Attachments (parse errors, execution errors, screenshots, links...)
1717
*
1818
* An attachment represents any kind of data associated with a line in a
1919
* [Source](#io.cucumber.messages.Source) file. It can be used for:

dotnet/Cucumber.Messages/generated/Envelope.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@ namespace Io.Cucumber.Messages.Types;
1212
/**
1313
* Represents the Envelope message in Cucumber's message protocol
1414
* @see <a href="https://github.com/cucumber/messages" >Github - Cucumber - Messages</a>
15-
*
16-
* When removing a field, replace it with reserved, rather than deleting the line.
17-
* When adding a field, add it to the end and increment the number by one.
18-
* See https://developers.google.com/protocol-buffers/docs/proto#updating for details
19-
*
20-
* All the messages that are passed between different components/processes are Envelope
21-
* messages.
2215
*/
2316

2417
public sealed class Envelope

dotnet/Cucumber.Messages/generated/Pickle.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ namespace Io.Cucumber.Messages.Types;
1313
* Represents the Pickle message in Cucumber's message protocol
1414
* @see <a href="https://github.com/cucumber/messages" >Github - Cucumber - Messages</a>
1515
*
16-
* //// Pickles
17-
*
1816
* A `Pickle` represents a template for a `TestCase`. It is typically derived
1917
* from another format, such as [GherkinDocument](#io.cucumber.messages.GherkinDocument).
2018
* In the future a `Pickle` may be derived from other formats such as Markdown or

0 commit comments

Comments
 (0)