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

backend server #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
21 changes: 21 additions & 0 deletions myapp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.*
!.github
!.gitignore
!.mvn
!.travis.yml
*.bak
*.log
*.class
*.diff
*.patch
*.iml
*.jar
*.war
*.ear
hs_err_pid*

target
eclipse-target
war
**/src/generated/
**/tmp/
1 change: 1 addition & 0 deletions myapp/.mvn/maven.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-Drevision=1.0.0-SNAPSHOT
60 changes: 60 additions & 0 deletions myapp/OpenApi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
openapi: 3.0.1
info:
title: CounterApiExample
description: This is just an example of the counter app
version: "1.1.1"
x-rootpackage: "com.flutter"
paths:
/counter:
x-component: countermanagement
get:
tags:
- CounterService
description: "Get the current value of the counter"
operationId: getCounter
responses:
"200":
description: "the counter's current value"
content:
application/json:
schema:
$ref: "#/components/schemas/Counter"
delete:
tags:
- CounterService
description: "Reset the counter"
operationId: resetCounter
responses:
"200":
description: "the counter's current value"
content:
application/json:
schema:
$ref: "#/components/schemas/Counter"
post:
tags:
- CounterService
description: "Increase the current value of the counter by an amount"
operationId: incCounter
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Counter"
responses:
"200":
description: "the counters current value"
content:
application/json:
schema:
$ref: "#/components/schemas/Counter"
components:
schemas:
Counter:
x-component: counter
required:
- amount
properties:
amount:
type: integer
45 changes: 45 additions & 0 deletions myapp/api/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.example.domain</groupId>
<artifactId>myapp</artifactId>
<version>${revision}</version>
</parent>
<artifactId>myapp-api</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>API of the server for the myapp application (containing datatypes, transfer-objects, and service interfaces).</description>

<dependencies>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
</dependency>
<dependency>
<groupId>com.devonfw.java.modules</groupId>
<artifactId>devon4j-rest</artifactId>
</dependency>
<dependency>
<groupId>com.devonfw.java.modules</groupId>
<artifactId>devon4j-logging</artifactId>
</dependency>
<dependency>
<groupId>com.devonfw.java.modules</groupId>
<artifactId>devon4j-security</artifactId>
</dependency>
<!-- Required for security REST service -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Tests -->
<dependency>
<groupId>com.devonfw.java.modules</groupId>
<artifactId>devon4j-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.example.domain.myapp.general.common.api;

import com.devonfw.module.basic.common.api.entity.GenericEntity;

/**
* This is the abstract interface for a {@link GenericEntity} of this application. We are using {@link Long} for
* all {@link #getId() primary keys}.
*/
public abstract interface ApplicationEntity extends GenericEntity<Long> {

}
Loading