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

Added swagger tags to generate classes with custom names #4

Merged
merged 20 commits into from
Aug 29, 2023
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
5 changes: 1 addition & 4 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Publish package to the Maven Central Repository and create GitHub Release
name: Publish package to the Maven Central Repository

on:
push:
tags:
- v*
pull_request:
branches: [ main ]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snapshot-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
java-version: '17'
distribution: 'adopt'
- name: Publish package
run: mvn --batch-mode deploy -DrepositoryId=github -Dmaven.deploy.skip=true
run: mvn --batch-mode deploy -DrepositoryId=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.extrawest</groupId>
<artifactId>Extrawest-OCPI-2.2.1-CPO-Server</artifactId>
<version>2023.8.24</version>
<version>2023.8.27</version>

<name>Extrawest-OCPI-2.2.1-CPO-Server</name>
<description>Extrawest-OCPI-2.2.1-CPO-Server</description>
Expand Down Expand Up @@ -225,8 +225,8 @@

<!-- GitHub Releases -->
<snapshotRepository>
<id>github-releases</id>
<url>https://maven.pkg.github.com/extrawest/Extrawest-OCPI-2.2.1-CPO-Server</url>
<id>github</id>
<url>https://maven.pkg.github.com/extrawest/extrawest-ocpi-2.2.1-cpo-server</url>
<name>GitHub Package Registry</name>
<uniqueVersion>false</uniqueVersion>
</snapshotRepository>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.extrawest.ocpi.model.dto.CdrDTO;
import com.extrawest.ocpi.service.CPOCdrService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
Expand All @@ -14,6 +15,7 @@

@RestController
@RequestMapping("/cpo/api/2.2.1/cdr")
@Tag(name = "CPOCdr")
public class CPOCdrController {

protected final CPOCdrService cpoCdrService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.extrawest.ocpi.model.dto.request.SetChargingProfileRequestDTO;
import com.extrawest.ocpi.model.dto.response.ChargingProfileResponseDTO;
import com.extrawest.ocpi.service.CPOChargingProfilesService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
Expand All @@ -11,6 +12,7 @@

@RestController
@RequestMapping("/cpo/api/2.2.1/chargingProfiles")
@Tag(name = "CPOChargingProfiles")
public class CPOChargingProfilesController {

protected final CPOChargingProfilesService cpoChargingProfilesService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
import com.extrawest.ocpi.model.dto.response.CommandResponseDTO;
import com.extrawest.ocpi.model.enums.CommandType;
import com.extrawest.ocpi.service.CPOCommandsService;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/cpo/api/2.2.1/commands")
@Tag(name = "CPOCommands")
public class CPOCommandsController {

protected final CPOCommandsService cpoCommandsService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.extrawest.ocpi.model.dto.CredentialsDTO;
import com.extrawest.ocpi.service.CPOCredentialsService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
Expand All @@ -10,6 +11,7 @@

@RestController
@RequestMapping("/cpo/api/2.2.1/credentials")
@Tag(name = "CPOCredentials")
public class CPOCredentialsController {

protected final CPOCredentialsService cpoCredentialsService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.extrawest.ocpi.model.AbstractDomainObject;
import com.extrawest.ocpi.model.dto.LocationDTO;
import com.extrawest.ocpi.service.CPOLocationService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
Expand All @@ -15,6 +16,7 @@

@RestController
@RequestMapping("/cpo/api/2.2.1/locations")
@Tag(name = "CPOLocation")
public class CPOLocationController {

protected final CPOLocationService cpoLocationService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.extrawest.ocpi.model.dto.ChargingPreferencesDTO;
import com.extrawest.ocpi.model.dto.SessionDTO;
import com.extrawest.ocpi.service.CPOSessionsService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
Expand All @@ -13,6 +14,7 @@

@RestController
@RequestMapping("/cpo/api/2.2.1/sessions")
@Tag(name = "CPOSessions")
public class CPOSessionsController {

protected final CPOSessionsService cpoSessionsService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.extrawest.ocpi.model.dto.TariffDTO;
import com.extrawest.ocpi.service.CPOTariffService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
Expand All @@ -14,6 +15,7 @@

@RestController
@RequestMapping("/cpo/api/2.2.1/tariffs")
@Tag(name = "CPOTariff")
public class CPOTariffController {

protected final CPOTariffService CPOTariffService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.extrawest.ocpi.model.dto.TokenDTO;
import com.extrawest.ocpi.model.enums.TokenType;
import com.extrawest.ocpi.service.CPOTokensService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
Expand All @@ -11,6 +12,7 @@

@RestController
@RequestMapping("/cpo/api/2.2.1/tokens")
@Tag(name = "CPOTokens")
public class CPOTokensController {

protected final CPOTokensService cpoTokensService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.extrawest.ocpi.model.dto.response.VersionResponseDTO;
import com.extrawest.ocpi.model.enums.VersionNumber;
import com.extrawest.ocpi.service.CPOVersionService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
Expand All @@ -15,6 +16,7 @@

@RestController
@RequestMapping("/cpo/api/2.2.1/versions")
@Tag(name = "CPOVersion")
public class CPOVersionController {

protected final CPOVersionService cpoVersionService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

import com.extrawest.ocpi.model.dto.ClientInfoDTO;
import com.extrawest.ocpi.service.ClientInfoService;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.constraints.Max;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/2.2.1/hubClientInfo")
@Tag(name = "ClientInfo")
public class ClientInfoController {

protected final ClientInfoService clientInfoService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.extrawest.ocpi.model.dto.ClientInfoDTO;
import com.extrawest.ocpi.service.HubClientInfoService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
Expand All @@ -14,6 +15,7 @@

@RestController
@RequestMapping("/hub/api/2.2.1/hubClientInfo")
@Tag(name = "HubClientInfo")
public class HubClientInfoController {

protected final HubClientInfoService hubClientInfoService;
Expand Down