Closed atulparmar closed 8 years ago
Sample example and requests are provided.
thank you so much!! Use Case: I am getting swagger file from ignite(raw swagger file) and I need to import/Render and publish in dev-portal.
Recoverable fatal error: Argument 2 passed to Apigee\SmartDocs\Model::fromArray() must be of the type array, object given, called in \sites\all\modules\smartdocs_service\smartdocs_service.inc on line 118 and defined in Apigee\SmartDocs\Model::fromArray() (line 237 of \profiles\apigee\libraries\mgmt-api-php-sdk\Apigee\SmartDocs\Model.php).
Means what? There is no context of your comment. Have you tried to go through the steps or you started to work with your own document? Did you copy curl, or re-typed it?
This is PHP. There is no compilation, so no compilation errors.
What are you trying to do? How can I help you if you give no problem reproduction steps?
I have drupal module and setup as per https://github.com/yuriylesyuk/smartdocs-services/blob/master/docs/smartdocs-services-step-by-steps.md
I am using swagger json Instead of yaml file. when I am calling service from postman, php code is looking for smartdocs_prepare_revision() function. I am using apigee smartdocs 7.x-5.1
I am getting Fatal error: Call to undefined function smartdocs_prepare_revision() in local_path\sites\all\modules\smartdocs_service\smartdocs_service.inc
I am still no closer in understanding what you're doing and what someone needs to do to reproduce your error.
How do you expect anyone to reproduce your problem, based on the information you provided?
I have done the setup as per @guideline & I am using my local server instance connecting to apigee edge (cloud).
I am using swagger json Instead of yaml file and using postman to test the rest api /devportal/smartdocs/import. when I am calling service from postman, php code is looking for smartdocs_prepare_revision() function. I have apigee smartdocs 7.x-5.1 installed in local.
I am getting Fatal error: Call to undefined function smartdocs_prepare_revision() in local_path\sites\all\modules\smartdocs_service\smartdocs_service.inc
line#139 $revision_array = smartdocs_prepare_revision($revision);
do you have smartdocs_prepare_revision() function code ?
getting closer. what is your swagger json file and postman request?
Swagger json file link
It will be great help if you can provide smartdocs_prepare_revision() function
I have added support of the json files to the import operation.
The form field called 'type' can contain either 'yaml' or 'json' value. The extension will be validated during import operation.
The documentation is updated and the 'Importing, Rendering, and Publishing swagger json specification' section contains a postman request example using your petstore.json file.
Right now the name of operation, import is somewhat misleading in a good sense for your use case, as it will not only import the file, but also will render and publish it.