Skip to content

Commit e81e3f6

Browse files
committed
Fix JsonLd Maven Plugin and Documentation
1 parent e8731a9 commit e81e3f6

File tree

2 files changed

+48
-2
lines changed

2 files changed

+48
-2
lines changed

documentation/developer-guide/modules/tooling-guide/pages/maven-plugin.adoc

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,52 @@ Configuration Properties:
523523
| `outputDirectory` | The path to the directory where the generated JSON payload will be written to. | `String` | none | {ok}
524524
|===
525525

526+
=== Generating Sample JSON-LD
527+
528+
The `generateJsonLd` goal generates a valid sample JSON-LD for a given Aspect Model as it
529+
could be returned by an Aspect that implements that Aspect Model. The default life cycle phase for
530+
the goal is `generate-resources`.
531+
532+
Usage:
533+
534+
[source,xml,subs=attributes+]
535+
----
536+
<build>
537+
<plugins>
538+
<plugin>
539+
<artifactId>esmf-aspect-model-maven-plugin</artifactId>
540+
<executions>
541+
<execution>
542+
<id>generate-jsonld</id>
543+
<goals>
544+
<goal>generateJsonLd</goal>
545+
</goals>
546+
</execution>
547+
</executions>
548+
<configuration>
549+
<modelsRootDirectory>$\{path-to-models-root}</modelsRootDirectory>
550+
<includes>
551+
<include>$\{urn-of-aspect-model-to-be-included}</include>
552+
</includes>
553+
<outputDirectory>$\{directory-for-generated-source-files}</outputDirectory>
554+
</configuration>
555+
</plugin>
556+
</plugins>
557+
</build>
558+
----
559+
560+
Configuration Properties:
561+
562+
[width="100%", options="header", cols="20,50,10,10,10"]
563+
|===
564+
| Property | Description | Type | Default Value | Required
565+
| `detailedValidationMessages` | Detailed validation messages if the model can not be loaded | `Boolean` | `false` | {nok}
566+
| `modelsRootDirectory` | The path to the root directory containing the Aspect Model file(s). | `String` | `$\{basedir}/src/main/resources/aspects` | {nok}
567+
| `includes` | A list of Aspect Model URNs identifying the Aspect Models to be included in the plugin execution. | `String` | none | {ok}
568+
| `outputDirectory` | The path to the directory where the generated JSON-LD will be written to. | `String` | none | {ok}
569+
|===
570+
571+
526572
== Pretty Print
527573

528574
The `prettyPrint` goal formats the given Aspect Model. The formatted file is written to the location

tools/esmf-aspect-model-maven-plugin/src/test/resources/generate-jsonld-spec-json-pom-to-file.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
<modelVersion>4.0.0</modelVersion>
1818

1919
<groupId>org.eclipse.esmf</groupId>
20-
<artifactId>test-generate-asyncapi-spec-mojo</artifactId>
20+
<artifactId>test-generate-jsonld-spec-mojo</artifactId>
2121
<version>1.0</version>
2222
<packaging>jar</packaging>
23-
<name>Test Generate AsyncApi Spec Mojo</name>
23+
<name>Test Generate JSON-LD Spec Mojo</name>
2424

2525
<build>
2626
<plugins>

0 commit comments

Comments
 (0)