Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: swagger-ui #530

Merged
merged 2 commits into from
Oct 29, 2021
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
2 changes: 1 addition & 1 deletion charts/candidate/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: ara
version: 10.0.0-rc.1
version: 10.0.0-rc.2
home: https://github.com/Decathlon/ara
description: |
ARA helps you to fight against regressions by letting it preanalyze your non-regression tests runs,
Expand Down
2 changes: 1 addition & 1 deletion charts/candidate/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ api:
image:
registry: docker.io
repository: decathlon/ara-api
tag: 11.0.0
tag: 11.0.1
imagePullPolicy: IfNotPresent
loggingMode:
- logging-console
Expand Down
10 changes: 8 additions & 2 deletions code/api/api/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Here are main layers in the server module, with the main technologies used by th
v
+---------------+
| Swagger{io}| Exposes a live documentation of
+---------------+ REST APIs at /swagger{dash}ui.html
+---------------+ REST APIs at /actuator/swagger{dash}ui/index.html?url=/actuator/openapi
....

=== Class Diagram
Expand Down Expand Up @@ -378,7 +378,13 @@ Once your ARA instance is live, you can update the current state of a feature fl

Swagger is a documentation and test tool for APIs. +
All REST resources must have JavaDoc so that it can be used for public API documentation. +
You can access to it at http://localhost:8080/swagger-ui.html
You can access to it at http://localhost:8080/actuator/swagger-ui/index.html?url=/actuator/openapi

Most operations on the swagger need authentication.
So if you want to test methods, we recommand running the front as well, so you can authenticate and run any method depending on your rights:app-name :

* Connect to the application: http://localhost:7000
* Go the the actuator through the same domain: http://localhost:7000/actuator/swagger-ui/index.html?url=/actuator/openapi

== Tests & Quality

Expand Down
2 changes: 1 addition & 1 deletion code/api/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<groupId>com.decathlon.ara</groupId>
<artifactId>ara-api</artifactId>
<version>11.0.0</version>
<version>11.0.1</version>

<name>ARA API</name>
<description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,24 @@
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import io.swagger.v3.oas.models.servers.Server;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class SwaggerConfiguration {

@Value("${ara.clientBaseUrl}")
private String baseUrl;

@Bean
public OpenAPI araOpenAPI() {
return new OpenAPI()
.addServersItem(new Server().url(baseUrl))
.info(
new Info()
.title("ARA API")
Expand Down
2 changes: 2 additions & 0 deletions code/api/api/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ spring:
#host: please-configure-spring.mail.host

springdoc:
swagger-ui:
disable-swagger-default-url: true
packagesToScan: com.decathlon.ara
pathsToMatch: /api/**
use-management-port: true
Expand Down
2 changes: 1 addition & 1 deletion code/api/database/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<groupId>com.decathlon.ara</groupId>
<artifactId>ara-database</artifactId>
<version>11.0.0</version>
<version>11.0.1</version>

<name>ARA Database</name>
<description>
Expand Down
2 changes: 1 addition & 1 deletion code/api/generated-cucumber-report/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<groupId>com.decathlon.ara</groupId>
<artifactId>ara-generated-cucumber-report</artifactId>
<version>11.0.0</version>
<version>11.0.1</version>

<name>ARA Cucumber</name>
<description>
Expand Down
4 changes: 2 additions & 2 deletions code/api/jacoco-aggregation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<parent>
<artifactId>ara-parent</artifactId>
<groupId>com.decathlon.ara</groupId>
<version>11.0.0</version>
<version>11.0.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<groupId>com.decathlon.ara</groupId>
<artifactId>jacoco-aggregation</artifactId>
<packaging>pom</packaging>
<version>11.0.0</version>
<version>11.0.1</version>

<name>Jacoco Report Aggregation</name>

Expand Down
2 changes: 1 addition & 1 deletion code/api/lib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<groupId>com.decathlon.ara</groupId>
<artifactId>ara-lib</artifactId>
<version>11.0.0</version>
<version>11.0.1</version>

<properties>
<java.version>16</java.version>
Expand Down
2 changes: 1 addition & 1 deletion code/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<groupId>com.decathlon.ara</groupId>
<artifactId>ara-parent</artifactId>
<packaging>pom</packaging>
<version>11.0.0</version>
<version>11.0.1</version>

<name>ARA Parent</name>
<description>
Expand Down