public function SpecFetcherInterface::fetchSpec in Apigee API Catalog 8.2
Same name and namespace in other branches
- 8 src/SpecFetcherInterface.php \Drupal\apigee_api_catalog\SpecFetcherInterface::fetchSpec()
Fetch OpenAPI specification file from URL.
Takes care of updating an ApiDoc file entity with the updated spec file. If "spec_file_source" uses a URL, it will fetch the specified file and put it in the "spec" file field. If it uses a "file", it won't change it. This method only updates the file entity if it completed without error (if it returns STATUS_UPDATED or STATUS_UNCHANGED), it does not save the ApiDoc entity.
Parameters
\Drupal\node\NodeInterface $apidoc: The ApiDoc entity.
Return value
string Returns the status of the operation. If it is STATUS_UPDATED or STATUS_UNCHANGED, the ApiDoc entity will need to be saved to store the changes.
1 method overrides SpecFetcherInterface::fetchSpec()
- SpecFetcher::fetchSpec in src/
SpecFetcher.php - Fetch OpenAPI specification file from URL.
File
- src/
SpecFetcherInterface.php, line 93
Class
- SpecFetcherInterface
- Interface SpecFetcherInterface.
Namespace
Drupal\apigee_api_catalogCode
public function fetchSpec(NodeInterface $apidoc) : string;