Content Property error on confluence cloud error - json

i am developing an addon on confluence cloud and i needed to store a value .i am persuing this tuto in the link bellow https://developer.atlassian.com/static/connect/docs/latest/modules/confluence/content-property.html
after declaring this value "ideation " in section "confluenceContentProperties" in my descriptor json file, i get this error in my console
The add-on descriptor failed to validate against the schema. Please confirm this add-on is intended for use with Confluence and then contact the add-on vendor.
/confluenceContentProperties/0: object has missing required properties (["key"])

You also need to update atlassian-connect.json file and ensure that the values are correct. You can also validate your json file with this validator.

Related

Logic Apps + Form Recognizer unable to send PDF to service

I have an Azure Logic App that uses a Analyze Document for Prebuilt or Custom models (v3.0 API) action. The Custom Model is good, I can hit it with Postman with no issue.
When I try to get a PDF from Sharepoint and send it to the service, I get an error saying:
{
"error": {
"code": "InvalidRequest",
"message": "Invalid request.",
"innererror": {
"code": "InvalidContent",
"message": "The file is corrupted or format is unsupported. Refer to documentation for the list of supported formats."
}
}
}
I've tried:
Passing the Get file content directly to the Document/Image File Content input
Passing body('Get_file_content)['$content']
Passing concat('data:application/pdf;base64,',body('Get_file_content')['$content']
This one converts to PDF in a Base64-to-PDF tool so I know the Base64 is good
Then I found out that the service wants binary format:
Passing base64ToBinary(body('Get_file_content')['$content'])
Still no go
Why can I not send the file to the Form Recognizer service?
EDIT:
Thank you to #vijaya. They helped me see that the Document/Image URL parameter was not necessary. Leaving that blank and using the original Get File Content worked!
Issue is with content-type. You need to pass content-type along with content for analyze document. I have reproduced issue from my side and below are steps I followed,
Initially created logic app as shown below,
Logic app failed with error,
The file is corrupted or format is unsupported. Refer to documentation for the list of supported formats.
Next modified logic app as shown below,
In Compose action setting content as
outputs('Get_blob_content_(V2)')?['body']?['$content'] and passing content-type as application/pdf as we are dealing with pdf files.
In Analyze Document for Prebuilt or Custom models (v3.0 API) action, using outputs of compose in Document/Image File Content.
Logic app ran successfully as shown below,
Output of Analyze Document is as shown below,

Azure API Management policy: validate request body against json schema

I am trying to implement a content validation policy in Azure API management.
I created a schema named event.
The policy looks like this:
<validate-content unspecified-content-type-action="prevent" max-size="12000" size-exceeded-action="prevent" errors-variable-name="validationErrors">
<content type="application/json" validate-as="json" action="prevent" schema-id="event" schema-ref="#/components/schemas/event" />
</validate-content>
When I try to test it, I get an error message in trace saying that the schema reference is wrong:
"details": "Could not resolve schema reference '#/components/schemas/event'. Path '', line 1, position 1."
Documentation says:
<content type="content type string" validate-as="json|xml|soap" schema-id="schema id" schema-ref="#/local/reference/path" action="ignore|prevent|detect" />
But I didn't find any clue how to find the schema-id and the schema-ref attributes.
When I open the schema there's nothing like this on the screen neither in the "Overview" nor under "Properties". Please someone tell me how to fill these to make the policy working. Or, if it exists, point me to the documentation where I can read it :)
schema-id and schema-ref both are optional attributes for validating request body against json schema.
As per this Azure API Management validation policies | Microsoft Docs:
schema-id: Name of an existing schema that was added to the API Management instance for content validation. If not specified, the default schema from the API definition is used.
schema-ref: For a JSON schema specified in schema-id, optional reference to a valid local reference path in the JSON document. Example: #/components/schemas/address. The attribute should return a JSON object that API Management handles as a valid JSON schema.
Make sure to check Azure API Management validation policies | Microsoft Docs schemas for content validation, provide correct schema location whether you are importing from a file or URL.

How to specify JSON parameters in a WADL file?

Dear StackOverflow Experts,
We have a requirement to access an API from SAP BODS. SAP BODS needs a WADL file configured in order to access the API. The API we are trying to call is a rest services API with a POST method and accepts only JSON parameters as input.
I have tried using SOAP UI to generate the WADL file but the WADL file does not include the JSON input parameters in the file.
Can anyone help me with a sample code of how a JSON input can be specified as a parameter in the WADL file.
I have tried going through all the documentation that is available but could not come across anything that could help.
I am new to API and any help is appreciated.

Appgyver - Unable to load resource's data model - dreamfactory API

I have this json feed.
I am unable to load this into Appgyver
I have set the following required settings:
- parameter app_name with the correct value
- added the reuired header X-DREAMFACTORY-APPLICATION-NAME
I always get the Oops, Unable to load resource's data model. error
Anyone who has a clue?
I am not very familiar with AppGyver, but I know it's been used with DreamFactory successfully by others. You have not provided enough information, but I will attempt to give you troubleshooting steps from the DreamFactory side.
First, are you definitely authenticating and passing a valid X-DreamFactory-Session-Token header? I can tell that you don't have guest access enabled (to make calls without authentication) because when I navigate to your link I receive a 401 with "There is no valid session for the current request."
Second, what is the call you're making from AppGyver? Is it a GET to simply list resources of a DB called vlaamse_vinyl, or what?
Finally, if you are passing X-DreamFactory-Application-Name in addition to the URI parameter ?app_name=vlaamse_vinyl this is redundant. Perhaps that is preventing your call from succeeding.

Mediawiki API error: Unrecognized value for parameter 'prop': extracts

I have a new installation of mediawiki. I am trying to use the API to simply get an article. The API url I am using is:
https://example.com/mediawiki/api.php?action=query&format=json&prop=extracts&titles=Vendor_cisco
Upon going to that URL I get: Unrecognized value for parameter 'prop': extracts
This seems odd because all of the following urls do work and return the right data:
https://example.com/mediawiki/api.php?action=query&format=json&prop=links&titles=Vendor_cisco
https://example.com/mediawiki/api.php?action=query&format=json&prop=categories&titles=Vendor_cisco
https://example.com/mediawiki/api.php?action=query&format=json&prop=revisions&titles=Vendor_cisco
How do I get the body and text from my article? I was under the impression prop=extracts is what is used.
prop=extracts is part of TextExtracts extension (formerly MobileFrontend extension). If you don't have that extension installed, you won't be able to use prop=extracts.