-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting Error on API Documentation settings page #122
Comments
Hi @nishasw , The entity API Doc has been converted to node type in the Apigee API Catalog module, Use the node "apidoc" bundle instead. For more information on configuring API Doc please check the README.md file. We are working on removing the configure link which is leading to admin/structure/apidoc in Apigee API Catalog module. |
Hi @shishir-intelli. Thanks for your reply. |
@nishasw in drupal 8/9 entity API Doc is a node type and so you can manage the apidocs in node itself, Follow this steps to upload OpenSpecification file,
or you can select a url from the drop down and then enter the full file URL under URL to OpenAPI specification file. If you want to edit the file later you can reimport a new file or link to a new URL by clicking Remove under OpenAPI specifications file, uploading a new spec snapshot or URL, and then clicking Save. (Also you can create your own custom field formatter to create a renderer of your choice. This can be useful to plugin other libraries to visualize your specifications. Currently you can use SmartDocs, Swagger UI or Redoc to render your API Documentation. For security setting you can refer here For control access to your api doc you can
For control access to api catalog page you can
If you are trying achieve something else apart from this please feel free to elaborate the same . |
Hi @shishir-intelli , Thanks for your reply. How can we set OAuth by choosing app [like we had in Drupal 7 ] instead of entering client credentials manually ? |
Hi @nishasw, I am not sure what you meant by 'Oauth by choosing app'? Did you mean to say API? |
Please see the attached screenshot from Drupal 7 . In Drupal 7, while sending the request to test sandbox services on portal, if needed to set OAuth, we used to select apps from the dropdown but in Drupal 8/9 we need to enter the app credentials manually. |
Hi @nishasw, In Drupal 7, it was managed by node however, it was originally defined in the OpenSpecification file which you upload and in this file it is defined as security scheme/Authorization setting. In Drupal 8/9, you create a node for API doc (Content->Add Content -> API Doc) and upload the OpenSpecification file there. Security schema example:
So basically you can manage this from OpenSpecification file by changing the OAuth structure to use authorizationCode For authorizationCode reference checkout : https://swagger.io/docs/specification/authentication/oauth2/ |
Hi @shishir-intelli , Thanks for you assistance. Really appreciate. |
Hi @shishir-intelli , I have following two issues currently :
Thanks in advance for your support. |
@nishasw can you put in separate issues for each of your problems? It is getting hard to follow this thread since you keep adding different problems to the same issue. API Doc issues should be added to the API Catalog module: https://github.com/apigee/apigee-api-catalog-drupal/issues |
Hi @nishasw I am looking at issue #123. |
Since we don't have a configuration option for this feature anymore, the link in the admin needs for module config needs to be removed. Reopening this issue, will close with a PR. |
Description
While accessing path /admin/structure/apidoc , I am getting the error below post installation of apigee kickstart module on both Drupal 8 & 9
The website encountered an unexpected error. Please try again later.
InvalidArgumentException: Class "Drupal\apigee_api_catalog\Entity\Form\ApiDocSettingsForm" does not exist. in Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition() (line 24 of core\lib\Drupal\Core\DependencyInjection\ClassResolver.php).
Drupal\Core\Controller\HtmlFormController->getFormObject(Object, 'Drupal\apigee_api_catalog\Entity\Form\ApiDocSettingsForm') (Line: 58)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 706)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Any help to resolve this will greatly be appreciated.
Steps to Reproduce
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: