Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
1 change: 1 addition & 0 deletions .vscode/cspell-templates.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ eastus
envconfig
ezfunc
fasterxml
hubspot
immer
inprogress
INPROGRESS
Expand Down
7 changes: 6 additions & 1 deletion templates/todo/api/common/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ components:
in: path
required: true
name: itemId
description: The Todo list unique identifier
description: The Todo item unique identifier
schema:
type: string
state:
Expand All @@ -79,13 +79,15 @@ components:
description: The max number of items to returns in a result
schema:
type: number
default: 20
skip:
in: query
required: false
name: skip
description: The number of items to skip within the results
schema:
type: number
default: 0

requestBodies:
TodoList:
Expand Down Expand Up @@ -179,6 +181,8 @@ paths:
responses:
200:
$ref: "#/components/responses/TodoList"
404:
description: Todo list not found
400:
description: Todo list is invalid
delete:
Expand Down Expand Up @@ -288,6 +292,7 @@ paths:
tags:
- Items
requestBody:
description: unique identifiers of the Todo items to update
content:
application/json:
schema:
Expand Down
1 change: 1 addition & 0 deletions templates/todo/api/java/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
src/main/java/com/microsoft/azure/simpletodo/api/ApiUtil.java
src/main/java/com/microsoft/azure/simpletodo/api/ItemsApi.java
src/main/java/com/microsoft/azure/simpletodo/api/ListsApi.java
src/main/java/com/microsoft/azure/simpletodo/model/TodoItem.java
src/main/java/com/microsoft/azure/simpletodo/model/TodoList.java
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1e0347e24b739d303f3af0493d1e730e4ac47a27fdac1e8a151defcc745496f0
baa1ff1c1daf16544c5985f4e1240a6d5611af0bb2d5f4bf5b631de8d53a9e70
116 changes: 116 additions & 0 deletions templates/todo/api/java/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions templates/todo/api/java/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"devDependencies": {
"prettier-plugin-java": "^1.6.2"
}
}
39 changes: 39 additions & 0 deletions templates/todo/api/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<springdoc.version>1.6.11</springdoc.version>
<!-- By default, set to write which formats the code.
This sample does not include format check failures on CI.
To see how to enable this, visit https://github.com/HubSpot/prettier-maven-plugin
-->
<plugin.prettier.goal>write</plugin.prettier.goal>
</properties>

<dependencies>
Expand Down Expand Up @@ -105,6 +110,27 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.hubspot.maven.plugins</groupId>
<artifactId>prettier-maven-plugin</artifactId>
<version>0.16</version>
<configuration>
<prettierJavaVersion>1.5.0</prettierJavaVersion>
<printWidth>125</printWidth>
<tabWidth>4</tabWidth>
<useTabs>false</useTabs>
<ignoreConfigFile>true</ignoreConfigFile>
<ignoreEditorConfig>true</ignoreEditorConfig>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>${plugin.prettier.goal}</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
Expand Down Expand Up @@ -134,11 +160,24 @@
<delegatePattern>false</delegatePattern>
<interfaceOnly>true</interfaceOnly>
<hideGenerationTimestamp>true</hideGenerationTimestamp>
<useTags>true</useTags>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.hubspot.maven.plugins</groupId>
<artifactId>prettier-maven-plugin</artifactId>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>${plugin.prettier.goal}</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package com.microsoft.azure.simpletodo;

import com.microsoft.applicationinsights.attach.ApplicationInsights;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import com.microsoft.applicationinsights.attach.ApplicationInsights;

@SpringBootApplication
public class SimpleTodoApplication {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.microsoft.azure.simpletodo.api;

import org.springframework.web.context.request.NativeWebRequest;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.context.request.NativeWebRequest;

public class ApiUtil {

public static void setExampleResponse(NativeWebRequest req, String contentType, String example) {
try {
HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class);
Expand Down
Loading