Closed nagashreeb closed 3 years ago
Hi @nagashreeb - I was unable to reproduce the issue locally. Could you specify the Drupal core version and API Catalog version that you are running ? If sharing your postman collection is an option then, i can open a support ticket to request that securely or you can email that to us.
Hi @nagashreeb - I was unable to reproduce the issue locally. Could you specify the Drupal core version and API Catalog version that you are running ? If sharing your postman collection is an option then, i can open a support ticket to request that securely or you can email that to us.
Hi Arun, Below are the software versions used: Drupal version: 8.7.8 PHP: 7.3.9 Apigee API catalog: version: '8.x-1.0'
I also tried using the maven smartdocs plugin which internally uses these REST APIs, I didn't have any success with that as well. From the maven plugin it throws a HTTP 415 (issue logged https://github.com/apigee/apigee-smartdocs-maven-plugin/issues/13 ) I had a discussion with Sai Saran as well, and he suggested to raise the issue here.
I have attached the postman collection with my ticket as a .txt file. I can send it over email too if you can let me know the email id to send it to.
@nagashreeb thanks. I upgraded Drupal core to: 8.7.8 and downgraded API catalog to version: '8.x-1.0'. Used the postman collection you shared but again had no luck reproducing the issue. Have you been able to import the spec and get it to display via the UI ? also are there any errors on the status page ?
@nagashreeb thanks. I upgraded Drupal core to: 8.7.8 and downgraded API catalog to version: '8.x-1.0'. Used the postman collection you shared but again had no luck reproducing the issue. Have you been able to import the spec and get it to display via the UI ? also are there any errors on the status page ? Hi @arunz6161, - Yes, I am able to manually upload the spec yaml file and view it through the UI. I am also able to upload the spec file using the REST API -http://****.com/jsonapi/apidoc/apidoc/spec I see a HTTP 201 response with the JSON payload containing the file uuid. I see an issue with Create Spec - POST http://****.com/jsonapi/apidoc/apidoc only.
Another strange thing that Sai and myself noticed, When I run the smartdocs maven plugin, the commandline output shows Spec imported successfully with a uuid. If I use the uuid from the maven commandline output in the POST payload of the REST API in postman for http://****.com/jsonapi/apidoc/apidoc, it works and I see a HTTP 201 created response and i can also view the spec on the UI. However, if i use the file uuid received in the response of the REST API call http://****.com/jsonapi/apidoc/apidoc/spec from Postman I see this HTTP 422 issue. Does this help? A screenshot of the above described behaviour is attached here -
@nagashreeb are you using the same user for your calls through Postman and with the Maven plugin?
@nagashreeb are you using the same user for your calls through Postman and with the Maven plugin?
@arunz6161 - I have used the same user - apidocadmin in both Postman and Maven plugins. I have also tried with the admin user apigeeadmin, i see the same errors.
@arunz6161 - any update on this issue?
We are going to close this issue since it is very old, and seems to be an issue with JSON API core module, not this module. This module is using the Drupal core JSON API module to allow REST API calls. It may be https://www.drupal.org/project/jsonapi/issues/3032904 or related, if this is still an issue you should put a bug into Drupal.org for this.
Drupal8 Devportal.postman_collection.json.txt
I am trying to upload API specs and create API doc using the REST APIs of API catalog module on Apigee kickstart drupal8 devportal. While trying to Create the API doc with the file uuid from the upload spec response, I am seeing a HTTP 422 Unprocessable entity error. The Spec file upload works and I am also able to see the uploaded file content in the drupal content/files folder. I am trying option B provided in the documentation below. https://www.drupal.org/docs/8/modules/apigee-api-catalog/expose-rest-apis-to-interact-with-api-docs#s-create-api-docs
Attaching the postman scripts with request response payloads captured in the examples.
To Reproduce Steps to reproduce the behavior:
Expected behavior The API doc should be created and mapped to the uploaded spec file.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context
Version Info