Skip to content

Commit 50bc5b3

Browse files
authored
Merge pull request #104100 from craigshoemaker/crs-functions-java-remove-json
Remove function.json blocks from Java examples
2 parents 780f8ad + a9fdc62 commit 50bc5b3

6 files changed

+7
-100
lines changed

articles/azure-functions/functions-bindings-cosmosdb-v2.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -169,22 +169,7 @@ Here's the Python code:
169169

170170
# [Java](#tab/java)
171171

172-
The following example shows a Cosmos DB trigger binding in *function.json* file and a [Java function](functions-reference-java.md) that uses the binding. The function is invoked when there are inserts or updates in the specified database and collection.
173-
174-
```json
175-
{
176-
"type": "cosmosDBTrigger",
177-
"name": "items",
178-
"direction": "in",
179-
"leaseCollectionName": "leases",
180-
"connectionStringSetting": "AzureCosmosDBConnection",
181-
"databaseName": "ToDoList",
182-
"collectionName": "Items",
183-
"createLeaseCollectionIfNotExists": false
184-
}
185-
```
186-
187-
Here's the Java code:
172+
This function is invoked when there are inserts or updates in the specified database and collection.
188173

189174
```java
190175
@FunctionName("cosmosDBMonitor")

articles/azure-functions/functions-bindings-event-grid.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -220,19 +220,7 @@ This section contains the following examples:
220220
* [Event Grid trigger, String parameter](#event-grid-trigger-string-parameter)
221221
* [Event Grid trigger, POJO parameter](#event-grid-trigger-pojo-parameter)
222222

223-
The following examples show trigger binding in a *function.json* file and [Java functions](functions-reference-java.md) that use the binding and print out an event, first receiving the event as ```String``` and second as a POJO.
224-
225-
```json
226-
{
227-
"bindings": [
228-
{
229-
"type": "eventGridTrigger",
230-
"name": "eventGridEvent",
231-
"direction": "in"
232-
}
233-
]
234-
}
235-
```
223+
The following examples show trigger binding in [Java](functions-reference-java.md) that use the binding and print out an event, first receiving the event as `String` and second as a POJO.
236224

237225
### Event Grid trigger, String parameter
238226

articles/azure-functions/functions-bindings-http-webhook.md

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -252,28 +252,7 @@ def main(req: func.HttpRequest) -> func.HttpResponse:
252252
* [Read parameter from a route](#read-parameter-from-a-route)
253253
* [Read POJO body from a POST request](#read-pojo-body-from-a-post-request)
254254

255-
The following examples show the HTTP trigger binding in a *function.json* file and the respective [Java functions](functions-reference-java.md) that use the binding.
256-
257-
Here's the *function.json* file:
258-
259-
```json
260-
{
261-
"disabled": false,
262-
"bindings": [
263-
{
264-
"authLevel": "anonymous",
265-
"type": "httpTrigger",
266-
"direction": "in",
267-
"name": "req"
268-
},
269-
{
270-
"type": "http",
271-
"direction": "out",
272-
"name": "res"
273-
}
274-
]
275-
}
276-
```
255+
The following examples show the HTTP trigger binding.
277256

278257
#### Read parameter from the query string
279258

articles/azure-functions/functions-bindings-storage-blob.md

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -201,26 +201,7 @@ def main(myblob: func.InputStream):
201201

202202
# [Java](#tab/java)
203203

204-
The following example shows a blob trigger binding in a *function.json* file and [Java code](functions-reference-java.md) that uses the binding. The function writes a log when a blob is added or updated in the `myblob` container.
205-
206-
Here's the *function.json* file:
207-
208-
```json
209-
{
210-
"disabled": false,
211-
"bindings": [
212-
{
213-
"name": "file",
214-
"type": "blobTrigger",
215-
"direction": "in",
216-
"path": "myblob/{name}",
217-
"connection":"MyStorageAccountAppSetting"
218-
}
219-
]
220-
}
221-
```
222-
223-
Here's the Java code:
204+
This function writes a log when a blob is added or updated in the `myblob` container.
224205

225206
```java
226207
@FunctionName("blobprocessor")

articles/azure-functions/functions-bindings-warmup.md

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -167,25 +167,9 @@ def main(warmupContext: func.Context) -> None:
167167

168168
# [Java](#tab/java)
169169

170-
The following example shows a warmup trigger in a *function.json* file and a [Java functions](functions-reference-java.md) that will run on each new instance when it is added to your app.
170+
The following example shows a warmup trigger that runs when each new instance is added to your app.
171171

172-
Your function must be named ```warmup``` (case-insensitive) and there may only be one warmup function per app.
173-
174-
Here's the *function.json* file:
175-
176-
```json
177-
{
178-
"bindings": [
179-
{
180-
"type": "warmupTrigger",
181-
"direction": "in",
182-
"name": "warmupContext"
183-
}
184-
]
185-
}
186-
```
187-
188-
Here's the Java code:
172+
Your function must be named `warmup` (case-insensitive) and there may only be one warmup function per app.
189173

190174
```java
191175
@FunctionName("Warmup")

includes/functions-bindings-event-hubs.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -284,17 +284,7 @@ def main(event: func.EventHubEvent):
284284

285285
# [Java](#tab/java)
286286

287-
The following example shows an Event Hub trigger binding in a *function.json* file and a [Java function](../articles/azure-functions/functions-reference-java.md) that uses the binding. The function logs the message body of the Event Hub trigger.
288-
289-
```json
290-
{
291-
"type": "eventHubTrigger",
292-
"name": "msg",
293-
"direction": "in",
294-
"eventHubName": "myeventhubname",
295-
"connection": "myEventHubReadConnectionAppSetting"
296-
}
297-
```
287+
The following example shows an Event Hub trigger binding which logs the message body of the Event Hub trigger.
298288

299289
```java
300290
@FunctionName("ehprocessor")

0 commit comments

Comments
 (0)