Skip to content
Open
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
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ api-project-users/src/main/java/org/opendevstack/apiservice/projectusers/api
api-project-users/src/main/java/org/opendevstack/apiservice/projectusers/model
api-project-platform/src/main/java/org/opendevstack/apiservice/projectplatform/api
api-project-platform/src/main/java/org/opendevstack/apiservice/projectplatform/model
api-project-users/.openapi-generator
/api-project-platform/.openapi-generator/
api-project/src/main/java/org/opendevstack/apiservice/project/api
api-project/src/main/java/org/opendevstack/apiservice/project/model
**/.openapi-generator

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Created **New API module** for managing EDP Projects with create and retrieve endpoints.
- Created **New module** external service projects to manage EDP Projects.

### External Service Jira (`external-service-jira`)
- **New module** for checking project existance in Jira (Server)
- Caching for the client
Expand Down
2 changes: 1 addition & 1 deletion api-project-platform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.opendevstack.apiservice</groupId>
<artifactId>devstack-api-service</artifactId>
<version>0.0.2</version>
<version>0.0.3</version>
</parent>

<artifactId>api-project-platform</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions api-project-users/openapi/api-project-users.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tags:
- name: Project Users
description: API for managing project users and their roles
paths:
/project/{projectKey}/users:
/projects/{projectKey}/users:
post:
tags:
- Project Users
Expand Down Expand Up @@ -89,7 +89,7 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/ApiResponseMembershipRequestResponse"
/project/{projectKey}/users/{userid}/status:
/projects/{projectKey}/users/{userid}/status:
get:
tags:
- Project Users
Expand Down
2 changes: 1 addition & 1 deletion api-project-users/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.opendevstack.apiservice</groupId>
<artifactId>devstack-api-service</artifactId>
<version>0.0.2</version>
<version>0.0.3</version>
</parent>

<artifactId>api-project-users</artifactId>
Expand Down
152 changes: 152 additions & 0 deletions api-project/openapi/api-project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
openapi: 3.0.3
info:
title: ODS API Server
description: API documentation for ODS (Open DevStack) API Service
contact:
name: ODS Team
version: v0.0.1
servers:
- url: http://{baseurl}/api/v0
variables:
baseurl:
default: localhost:8080
description: Development environment
tags:
- name: Project
description: API for manage EDP projects.
paths:
/projects:
post:
tags:
- Projects
summary: Create a new project.
description: Creates a new project with the provided configuration. Generates a unique project key if not provided.
operationId: createProject
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateProjectRequest'
responses:
'200':
description: Project creation initiated successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/CreateProjectResponse'
'400':
description: Invalid request body or validation error.
content:
application/json:
schema:
$ref: '#/components/schemas/CreateProjectResponse'
"401":
description: Invalid client token on the request.
content:
application/json:
schema:
$ref: '#/components/schemas/RestErrorMessage'
"403":
description: Insufficient permissions for the client to access the resource.
content:
application/json:
schema:
$ref: '#/components/schemas/RestErrorMessage'
'409':
description: A project with the specified key already exists.
content:
application/json:
schema:
$ref: '#/components/schemas/CreateProjectResponse'
'500':
description: Internal server error during project creation.
content:
application/json:
schema:
$ref: '#/components/schemas/CreateProjectResponse'
/projects/{projectKey}:
get:
tags:
- Projects
summary: Get project status by project key.
description: Returns the current status and details of the project identified by the given project key.
operationId: getProject
parameters:
- name: projectKey
in: path
required: true
schema:
type: string
description: Project key to retrieve information.
responses:
'200':
description: Project information retrieved successfully.
content:
application/json:
schema:
$ref: '#/components/schemas/CreateProjectResponse'
'404':
description: Project not found.
content:
application/json:
schema:
$ref: '#/components/schemas/CreateProjectResponse'
"401":
description: Invalid client token on the request.
content:
application/json:
schema:
$ref: '#/components/schemas/RestErrorMessage'
"403":
description: Insufficient permissions for the client to access the resource.
content:
application/json:
schema:
$ref: '#/components/schemas/RestErrorMessage'
'500':
description: Internal server error.
content:
application/json:
schema:
$ref: '#/components/schemas/CreateProjectResponse'
components:
schemas:
RestErrorMessage:
properties:
message:
type: string
required:
- message
CreateProjectRequest:
type: object
properties:
projectKey:
type: string
description: Optional project key. If not provided, a unique key will be generated.
projectKeyPattern:
type: string
description: Optional pattern for generating the project key (e.g. 'SS%06d').
projectName:
type: string
description: Name of the project.
projectDescription:
type: string
description: Description of the project.
required:
- projectName
CreateProjectResponse:
type: object
properties:
projectKey:
type: string
status:
type: string
message:
type: string
error:
type: string
errorKey:
type: string
errorDescription:
type: string
163 changes: 163 additions & 0 deletions api-project/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.opendevstack.apiservice</groupId>
<artifactId>devstack-api-service</artifactId>
<version>0.0.3</version>
</parent>

<artifactId>api-project</artifactId>
<name>API Projects</name>
<description>API module for managing EDP projects</description>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-oauth2-resource-server</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>

<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
</dependency>

<dependency>
<groupId>org.opendevstack.apiservice</groupId>
<artifactId>service-projects</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>0.12.3</version>
</dependency>

<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>0.12.3</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<version>0.12.3</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>1.6.3</version>
</dependency>

<dependency>
<groupId>org.openapitools</groupId>
<artifactId>jackson-databind-nullable</artifactId>
<version>${jackson-databind-nullable.version}</version>
</dependency>

<!-- Test dependencies -->

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.6.3</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-api-project</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<generatorName>spring</generatorName>
<output>${project.basedir}</output>
<library>spring-boot</library>
<inputSpec>${project.basedir}/openapi/api-project.yaml</inputSpec>
<apiPackage>org.opendevstack.apiservice.project.api</apiPackage>
<modelPackage>org.opendevstack.apiservice.project.model</modelPackage>
<invokerPackage>org.opendevstack.apiservice.project</invokerPackage>
<skipOverwrite>false</skipOverwrite>
<generateApiTests>false</generateApiTests>
<generateModelTests>false</generateModelTests>
<generateApiDocumentation>false</generateApiDocumentation>
<generateModelDocumentation>false</generateModelDocumentation>
<generateSupportingFiles>false</generateSupportingFiles>
<configOptions>
<interfaceOnly>true</interfaceOnly>
<useSpringBoot3>true</useSpringBoot3>
<documentationProvider>springdoc</documentationProvider>
<skipDefaultInterface>true</skipDefaultInterface>
<hideGenerationTimestamp>true</hideGenerationTimestamp>
<useTags>true</useTags>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading
Loading