-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clarify groups, add new versioning and export/import docs (#1438)
* add clarification from eric on optional groups, tidy up ui labels * properly modularize maven plugin docs * new topics on using rest api to manage custom versions and export/import registry data, tidy up
- Loading branch information
1 parent
dd1c8a7
commit bc9235b
Showing
22 changed files
with
333 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
...les/ROOT/partials/getting-started/proc-adding-artifacts-using-maven-plugin.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Metadata created by nebel | ||
// ParentAssemblies: assemblies/getting-started/as_installing-the-registry.adoc | ||
|
||
[id="adding-artifacts-using-maven-plugin"] | ||
= Adding schema and API artifacts using the Maven plug-in | ||
|
||
[role="_abstract"] | ||
The most common use case for the Maven plug-in is adding artifacts during a build. You can accomplish this by using the `register` execution goal. | ||
|
||
.Procedure | ||
* Update your Maven `pom.xml` file to use the `apicurio-registry-maven-plugin` to register an artifact. The following example shows registering Apache Avro and GraphQL schemas: | ||
+ | ||
[source,xml] | ||
---- | ||
<plugin> | ||
<groupId>io.apicurio</groupId> | ||
<artifactId>apicurio-registry-maven-plugin</artifactId> | ||
<version>${apicurio.version}</version> | ||
<executions> | ||
<execution> | ||
<phase>generate-sources</phase> | ||
<goals> | ||
<goal>register</goal> <1> | ||
</goals> | ||
<configuration> | ||
<registryUrl>http://REGISTRY-URL/apis/registry/v2</registryUrl> <2> | ||
<artifacts> | ||
<artifact> | ||
<groupId>TestGroup</groupId> <3> | ||
<artifactId>FullNameRecord</artifactId> | ||
<file>${project.basedir}/src/main/resources/schemas/record.avsc</file> | ||
<ifExists>FAIL</ifExists> | ||
</artifact> | ||
<artifact> | ||
<groupId>TestGroup</groupId> | ||
<artifactId>ExampleAPI</artifactId> <4> | ||
<type>GRAPHQL</type> | ||
<file>${project.basedir}/src/main/resources/apis/example.graphql</file> | ||
<ifExists>RETURN_OR_UPDATE</ifExists> | ||
<canonicalize>true</canonicalize> | ||
</artifact> | ||
</artifacts> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
---- | ||
<1> Specify `register` as the execution goal to upload the schema artifact to the registry. | ||
<2> Specify the {registry} URL with the `../apis/registry/v2` endpoint. | ||
<3> Specify the {registry} artifact group ID. You can specify the `default` group if you do not want to use a unique group. | ||
<4> You can upload multiple artifacts using the specified group ID, artifact ID, and location. | ||
|
||
[role="_additional-resources"] | ||
.Additional resources | ||
* For more details on the {registry} Maven plug-in, see the link:https://github.com/Apicurio/apicurio-registry-demo[Registry demonstration example] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
...OOT/partials/getting-started/proc-downloading-artifacts-using-maven-plugin.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Metadata created by nebel | ||
// ParentAssemblies: assemblies/getting-started/as_installing-the-registry.adoc | ||
|
||
[id="downloading-artifacts-using-maven-plugin"] | ||
= Downloading schema and API artifacts using the Maven plug-in | ||
|
||
[role="_abstract"] | ||
You can use the Maven plug-in to download artifacts from {registry}. This is often useful, for example, when generating code from a registered schema. | ||
|
||
.Procedure | ||
* Update your Maven `pom.xml` file to use the `apicurio-registry-maven-plugin` to download an artifact. The following example shows downloading Apache Avro and GraphQL schemas. | ||
+ | ||
[source,xml] | ||
---- | ||
<plugin> | ||
<groupId>io.apicurio</groupId> | ||
<artifactId>apicurio-registry-maven-plugin</artifactId> | ||
<version>${apicurio.version}</version> | ||
<executions> | ||
<execution> | ||
<phase>generate-sources</phase> | ||
<goals> | ||
<goal>download</goal> <1> | ||
</goals> | ||
<configuration> | ||
<registryUrl>http://REGISTRY-URL/apis/registry/v2</registryUrl> <2> | ||
<artifacts> | ||
<artifact> | ||
<groupId>TestGroup</groupId> <3> | ||
<artifactId>FullNameRecord</artifactId> <4> | ||
<file>${project.build.directory}/classes/record.avsc</file> | ||
<overwrite>true</overwrite> | ||
</artifact> | ||
<artifact> | ||
<groupId>TestGroup</groupId> | ||
<artifactId>ExampleAPI</artifactId> | ||
<version>1</version> | ||
<file>${project.build.directory}/classes/example.graphql</file> | ||
<overwrite>true</overwrite> | ||
</artifact> | ||
</artifacts> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
---- | ||
<1> Specify `download` as the execution goal. | ||
<2> Specify the {registry} URL with the `../apis/registry/v2` endpoint. | ||
<3> Specify the {registry} artifact group ID. You can specify the `default` group if you do not want to use a unique group. | ||
<4> You can download multiple artifacts to a specified directory using the artifact ID. | ||
|
||
[role="_additional-resources"] | ||
.Additional resources | ||
* For more details on the {registry} Maven plug-in, see the link:https://github.com/Apicurio/apicurio-registry-demo[Registry demonstration example] |
Oops, something went wrong.