8000 Add raw OpenApi documentation files to rest-api documentation by DAHAG-ArisNourbakhsh · Pull Request #22940 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions services/pom.xml
8000
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,67 @@
<toc/>
<toc-position>left</toc-position>
<generated>${project.basedir}/target/apidocs-rest/asciidoc</generated>
<!-- Boolean attributes are passed as defined/undefined to AsciiDoc, not at their literal value -->
<project_community>true</project_community>
<project_product>false</project_product>
</attributes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-raw-openapi-definition</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/target/apidocs-rest/output</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}/apidocs-rest/swagger/apidocs</directory>
<includes>
<include>**/openapi.yaml</include>
<include>**/openapi.json</include>
</includes>
</resource>
</resources>
<overwrite>true</overwrite>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>


<profile>
<id>product</id>
<activation>
<property>
<name>product</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-docs</id>
<phase>package</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration combine.children="append">
<attributes combine.children="append">
<project_community>false</project_community>
<project_product>true</project_product>
</attributes>
</configuration>
</execution>
Expand All @@ -338,5 +399,6 @@
</plugins>
</build>
</profile>

</profiles>
</project>
91B2
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
= {{{appName}}}
{{#headerAttributes}}
:toc: left
:icons: font
:toclevels: 2
:keywords: openapi, rest, {{appName}}
:specDir: {{specDir}}
Expand Down Expand Up @@ -30,6 +31,19 @@ Version: {{version}}

For example `http://localhost:8080/admin/realms`

ifdef::project_community[]

=== OpenAPI Definitions

WARNING: The OpenAPI definitions are a feature that is currently in preview.
Please provide your feedback by link:https://github.com/keycloak/keycloak/discussions/8898[joining this discussion] while we’re continuing to work on this.
If you find something is outdated or wrong, create a GitHub issue and provide a pull request.

* link:openapi.json[OpenAPI definition in JSON format]
* link:openapi.yaml[OpenAPI definition in YAML format]

endif::[]

{{#specinclude}}intro.adoc{{/specinclude}}

{{#hasAuthMethods}}
Expand Down
0