Skip to content

Commit

Permalink
Implement applications endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
pathob committed Sep 30, 2020
1 parent 19cc5ea commit dace61d
Show file tree
Hide file tree
Showing 8 changed files with 662 additions and 0 deletions.
302 changes: 302 additions & 0 deletions index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,246 @@ ifdef::internal-generation[]
endif::internal-generation[]


[.Default]
=== Default


[.addApplication]
==== addApplication

`POST /applications`



===== Description




// markup not found, no include::{specDir}applications/POST/spec.adoc[opts=optional]



===== Parameters


===== Body Parameter

[cols="2,3,1,1,1"]
|===
|Name| Description| Required| Default| Pattern

| ApplicationBean
| <<ApplicationBean>>
| -
|
|

|===





===== Return Type



-

===== Content Type

* application/json

===== Responses

.http response codes
[cols="2,3,1"]
|===
| Code | Message | Datatype


| 0
| default response
| <<>>

|===

===== Samples


// markup not found, no include::{snippetDir}applications/POST/http-request.adoc[opts=optional]


// markup not found, no include::{snippetDir}applications/POST/http-response.adoc[opts=optional]



// file not found, no * wiremock data link :applications/POST/POST.json[]


ifdef::internal-generation[]
===== Implementation

// markup not found, no include::{specDir}applications/POST/implementation.adoc[opts=optional]


endif::internal-generation[]


[.getApplications]
==== getApplications

`GET /applications`



===== Description




// markup not found, no include::{specDir}applications/GET/spec.adoc[opts=optional]



===== Parameters







===== Return Type



-

===== Content Type

* application/json

===== Responses

.http response codes
[cols="2,3,1"]
|===
| Code | Message | Datatype


| 0
| default response
| <<>>

|===

===== Samples


// markup not found, no include::{snippetDir}applications/GET/http-request.adoc[opts=optional]


// markup not found, no include::{snippetDir}applications/GET/http-response.adoc[opts=optional]



// file not found, no * wiremock data link :applications/GET/GET.json[]


ifdef::internal-generation[]
===== Implementation

// markup not found, no include::{specDir}applications/GET/implementation.adoc[opts=optional]


endif::internal-generation[]


[.setApplications]
==== setApplications

`PUT /applications`



===== Description




// markup not found, no include::{specDir}applications/PUT/spec.adoc[opts=optional]



===== Parameters


===== Body Parameter

[cols="2,3,1,1,1"]
|===
|Name| Description| Required| Default| Pattern

| ApplicationsBean
| <<ApplicationsBean>>
| -
|
|

|===





===== Return Type



-

===== Content Type

* application/json

===== Responses

.http response codes
[cols="2,3,1"]
|===
| Code | Message | Datatype


| 0
| default response
| <<>>

|===

===== Samples


// markup not found, no include::{snippetDir}applications/PUT/http-request.adoc[opts=optional]


// markup not found, no include::{snippetDir}applications/PUT/http-response.adoc[opts=optional]



// file not found, no * wiremock data link :applications/PUT/PUT.json[]


ifdef::internal-generation[]
===== Implementation

// markup not found, no include::{specDir}applications/PUT/implementation.adoc[opts=optional]


endif::internal-generation[]


[.Directories]
=== Directories

Expand Down Expand Up @@ -955,6 +1195,49 @@ endif::internal-generation[]
|===


[#ApplicationBean]
=== _ApplicationBean_



[.fields-ApplicationBean]
[cols="2,1,2,4,1"]
|===
| Field Name| Required| Type| Description| Format

| name
|
| String
|
|

| description
|
| String
|
|

| active
|
| Boolean
|
|

| type
|
| String
|
| _Enum:_ GENERIC, PLUGIN, CROWD, JIRA, CONFLUENCE, BITBUCKET, FISHEYE, CRUCIBLE, BAMBOO,

| password
|
| String
|
|

|===


[#ApplicationLinkBean]
=== _ApplicationLinkBean_

Expand Down Expand Up @@ -1041,6 +1324,25 @@ endif::internal-generation[]
|===


[#ApplicationsBean]
=== _ApplicationsBean_



[.fields-ApplicationsBean]
[cols="2,1,2,4,1"]
|===
| Field Name| Required| Type| Description| Format

| applications
|
| List of <<ApplicationBean>>
|
|

|===


[#DirectoriesBean]
=== _DirectoriesBean_

Expand Down
43 changes: 43 additions & 0 deletions src/main/java/de/aservo/confapi/crowd/model/ApplicationBean.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package de.aservo.confapi.crowd.model;

import de.aservo.confapi.commons.constants.ConfAPI;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@Data
@NoArgsConstructor
@XmlRootElement(name = ConfAPI.APPLICATION)
public class ApplicationBean {

public enum ApplicationType {
GENERIC,
PLUGIN,
CROWD,
JIRA,
CONFLUENCE,
BITBUCKET,
FISHEYE,
CRUCIBLE,
BAMBOO,
;
}

@XmlElement
private String name;

@XmlElement
private String description;

@XmlElement
private Boolean active;

@XmlElement
private ApplicationType type;

@XmlElement
private String password;

}
21 changes: 21 additions & 0 deletions src/main/java/de/aservo/confapi/crowd/model/ApplicationsBean.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package de.aservo.confapi.crowd.model;

import de.aservo.confapi.commons.constants.ConfAPI;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.Collection;

@Data
@NoArgsConstructor
@AllArgsConstructor
@XmlRootElement(name = ConfAPI.APPLICATIONS)
public class ApplicationsBean {

@XmlElement
private Collection<ApplicationBean> applications;

}
Loading

0 comments on commit dace61d

Please sign in to comment.