Smartdocs v2.1.0 plugin - fails with status 422 on OpenAPI spec import

Drupal v8, maven smartdocs plugin v2.1.0 and Apigee API Catalog module version 8.x-2.2

Followed the steps are per the advanced implementation steps

When running it fails on import. Ran the step1 and step 2 curl commands for importing an openAPI spec. The step2 fails with a 422.

Here is partial error response ----- and same result when running the maven smartdocs plugin

"errors": [ { "title": "Unprocessable Entity",

"status": "422",

"detail": "The attribute body does not exist on the node--apidoc resource type.",

"links": { "via": { "href": "https://xxx.yyy.com/xxxyyy/web/jsonapi/node/apidoc" }

https://github.com/apigee/apigee-smartdocs-maven-plugin/tree/master/samples/Drupal8#advanced-impleme...

https://documenter.getpostman.com/view/550470/S1a1aoeF?version=2c9ff08d-6e80-4fb9-b303-553f40e0e790#... (Request 3 and 4 from this list)

0 6 179
6 REPLIES 6

@Mehedi Hashir - Can you confirm you are not passing a "/" at the end of the URL in your pom? for portal url?

Sai, Not passing a '/' at the end of the URL.

[DEBUG] (s) options = update

[DEBUG] (f) portalAPIDocFormat = basic_html

[DEBUG] (f) portalDirectory = ./specs

[DEBUG] (f) portalFormat = yaml

[DEBUG] (f) portalPassword = xxxx

[DEBUG] (f) portalURL = https://dev.internal.intient.com/INTIENT/web

[DEBUG] (f) portalUserName = xxxxxx

[DEBUG] (f) projectName = DeveloperPortal

[DEBUG] (f) projectVersion = 1.0

[DEBUG] (s) skip = false

Thanks

Mehedi

Thanks - Anything from the portal logs ? When this is done ? Does it work from postman ?

Sai,

Portal log message shown below.

The same result using postman/curl. The "Step 2 :" create a new apidoc with uploaded spec file fails.

Please note this is the first attempt at using the new smardocs plugin 2.10.0 which works with the API catalog v8.x.2.2

Same result with trying to import the sample code too.

-- From the portal -----

Home Administration Reports Recent log messages

Type php

Date Wednesday, August 19, 2020 - 13:56

User xxxx

Location https://dev.internal.intient.com/INTIENT/web/jsonapi/node/apidoc

Referrer MessageSymfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException: The attribute body does not exist on the node--apidoc resource type. in Drupal\jsonapi\Normalizer\FieldableEntityDenormalizer->prepareInput() (line 62 of /var/www/html/INTIENT/web/core/modules/jsonapi/src/Normalizer/FieldableEntityDenormalizer.php). Severity Error

Hostname 192.168.16.85

Operations

-- From the portal -----

Thanks

Mehedi

@Gitesh Koli - can you help ?

@Mehedi Hashir,

Have you tried this on a fresh install of the Apigee Kickstart?

I think there might be an upgrade issue on the API catalog module from version 1.x to 2.x

Can you also try the following:

1. uninstall the Apigee api catalog module

2. Make sure all the API Doc nodes are deleted

3. Delete the API Doc content type

4. Re-enable the module and re-configure Json api module

Let us know if that works.