-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
205 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,200 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "PdfFormFiller", | ||
"description": "Allows filling and retrieving data from selected forms. (DEV VERSION)", | ||
"version": "0.4" | ||
}, | ||
"host": "restpdfformfiller-dev.azurewebsites.net", | ||
"basePath": "/api/", | ||
"schemes": [ | ||
"https" | ||
], | ||
"consumes": [ | ||
"text/plain", | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json", | ||
"application/xml" | ||
], | ||
"paths": { | ||
"/GetXfaData": { | ||
"post": { | ||
"responses": { | ||
"400": { | ||
"description": "Bad request." | ||
}, | ||
"default": { | ||
"description": "default", | ||
"schema": { | ||
"title": "formData", | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"summary": "Get XFA Form Data", | ||
"description": "Gets the data from the given XFA form.", | ||
"consumes": [ | ||
"text/plain" | ||
], | ||
"produces": [ | ||
"application/xml", | ||
"application/json" | ||
], | ||
"operationId": "GetXfaData", | ||
"parameters": [ | ||
{ | ||
"name": "format", | ||
"default": "json", | ||
"enum": [ | ||
"json", | ||
"xml" | ||
], | ||
"in": "query", | ||
"required": true, | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "x-functions-key", | ||
"required": true, | ||
"in": "header", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "pdfContentBase64", | ||
"description": "File content in base64 (use body/$content from SharePoint Get file action)", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"/FillXfaData": { | ||
"post": { | ||
"responses": { | ||
"400": { | ||
"description": "Bad request." | ||
}, | ||
"default": { | ||
"description": "default", | ||
"schema": { | ||
"title": "formData", | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"summary": "Fill XFA Form Data", | ||
"description": "Fills the specified data into the given PDF/XFAF form.", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/pdf" | ||
], | ||
"operationId": "FillXfaData", | ||
"parameters": [ | ||
{ | ||
"name": "pdfContentBase64", | ||
"in": "header", | ||
"type": "string", | ||
"format": "bytes" | ||
}, | ||
{ | ||
"name": "x-functions-key", | ||
"required": true, | ||
"in": "header", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "fillXfaBodyData", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"x-ms-dynamic-schema": { | ||
"operationId": "GetXfaFormSchema", | ||
"parameters": { | ||
"pdfFormData": { | ||
"parameter": "pdfContentBase64" | ||
}, | ||
"x-functions-key": { | ||
"parameter": "x-functions-key" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"/GetXfaSchema": { | ||
"post": { | ||
"responses": { | ||
"400": { | ||
"description": "Bad request." | ||
}, | ||
"default": { | ||
"description": "default", | ||
"schema": { | ||
"title": "formSchema", | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"summary": "Get XFA Form Schema", | ||
"description": "Gets JSON schema of datasets from given PDF document.", | ||
"consumes": [ | ||
"text/plain" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"parameters": [ | ||
{ | ||
"name": "x-session-id", | ||
"in": "header", | ||
"type": "string", | ||
"required": false | ||
}, | ||
{ | ||
"name": "x-functions-key", | ||
"required": true, | ||
"in": "header", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "pdfFormData", | ||
"in": "body", | ||
"required": false, | ||
"schema": { | ||
"type": "string", | ||
"format": "bytes" | ||
} | ||
} | ||
], | ||
"operationId": "GetXfaFormSchema" | ||
} | ||
} | ||
}, | ||
"definitions": {}, | ||
"parameters": {}, | ||
"responses": {}, | ||
"securityDefinitions": { | ||
"oauth2_auth": { | ||
"type": "oauth2", | ||
"flow": "accessCode", | ||
"authorizationUrl": "https://login.windows.net/common/oauth2/authorize", | ||
"tokenUrl": "https://login.windows.net/common/oauth2/authorize", | ||
"scopes": {} | ||
} | ||
}, | ||
"security": [ | ||
{ | ||
"oauth2_auth": [] | ||
} | ||
], | ||
"tags": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Migrated from https://github.com/dkontyko/PdfFormFillerConnector. | ||
|
||
The accompanying Power Automate custom connector for the Function app. | ||
|
||
Write-up note: To configure OAuth with AAD, you need to create the app registration, then you need to go to Expose an API and add "User.Read" as a scope after your application URI. Then you need to wait a day for AAD to catch up to your chanage, then go (back) to API permissions and click Add a permission, click My APIs, then select your newly created User.Read permission and click Add permissions. |