Skip to content

Commit

Permalink
adding connector
Browse files Browse the repository at this point in the history
  • Loading branch information
dkontyko committed Sep 23, 2023
1 parent 70be404 commit 6f78622
Show file tree
Hide file tree
Showing 2 changed files with 205 additions and 0 deletions.
200 changes: 200 additions & 0 deletions CustomConnector/PdfFormFiller.swagger.json
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": []
}
5 changes: 5 additions & 0 deletions CustomConnector/README.md
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.

0 comments on commit 6f78622

Please sign in to comment.