yuriylesyuk / smartdocs-services

The REST API services module for key functionality to enable CI/CD for swagger-devportal workflow.
6 stars 4 forks source link

Smartdoc render and import sample request #1

Closed atulparmar closed 8 years ago

atulparmar commented 8 years ago
  1. How do you request for render ? can you please provide sample request ??
  2. How do you reuqest for importing swagger json file ? can you please provide sample request ??
yuriylesyuk commented 8 years ago
  1. Render operation is a WIP. Do you need it specifically? Can you provide your use case?
  2. Import operation is now documented. Look at the Install and User Guide link.

Sample example and requests are provided.

atulparmar commented 8 years ago

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.

atulparmar commented 8 years ago

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).

ylesyuk commented 8 years ago

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?

yuriylesyuk commented 8 years ago

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?

atulparmar commented 8 years ago

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

smartdocs.admin.zip

yuriylesyuk commented 8 years ago

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?

atulparmar commented 8 years ago

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 ?

yuriylesyuk commented 8 years ago

getting closer. what is your swagger json file and postman request?

atulparmar commented 8 years ago

Swagger json file link request_header request_body

It will be great help if you can provide smartdocs_prepare_revision() function

ylesyuk commented 8 years ago

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.