I am making an attempt to create a controller to render a swagger documentation utilizing Drupal Development Service module swagger_ui_formatter that present a formatter to Drupal Development Service file discipline that render swagger information (yml, yaml, json) utilizing javascript libraries to point out Drupal Development Service documentation like swagger web site do. Then i copy my yml file in my module listing and in my controller i can load this file.
public perform buildApiDocumentation() { $file_system = Drupal::service('file_system'); $searchFiles = '/^.*.(yml)$/'; $listing = dirname(__DIR__,2).'/docs'; $file = $file_system->scanDirectory($listing, $searchFiles, ['recurse' => FALSE]); }
However i do not know the way am i able to render this file utilizing Drupal Development Service swagger formatter that Drupal Development Service module present, i am unable to use Drupal Development Service conventional means to make use of this formatter, making a content material kind with a file discipline and after that create a view and render it, as a result of is a really handbook course of and i want to repair Drupal Development Service api documentation file in a listing that solely Drupal Development Service dev staff can replace.