Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@api-platform/api-doc-parser

Package Overview
Dependencies
Maintainers
6
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@api-platform/api-doc-parser - npm Package Compare versions

Comparing version 0.16.3 to 0.16.4

9

lib/hydra/parseHydraDocumentation.js

@@ -138,2 +138,7 @@ import { __awaiter } from "tslib";

}
const url = get(entrypoint, `[0]["${property["@id"]}"][0]["@id"]`);
if (!url) {
console.error(new Error(`Unable to find the URL for "${property["@id"]}" in the entrypoint, make sure your API resource has at least one GET collection operation declared.`));
continue;
}
// Add fields

@@ -224,6 +229,2 @@ const relatedClass = findRelatedClass(docs, property);

}
const url = get(entrypoint, `[0]["${property["@id"]}"][0]["@id"]`);
if (!url) {
throw new Error(`Unable to find the URL for "${property["@id"]}" in the entrypoint, make sure your API resource has at least one GET collection operation declared.`);
}
const resource = new Resource(guessNameFromUrl(url, entrypointUrl), url, {

@@ -230,0 +231,0 @@ id: relatedClass["@id"],

{
"name": "@api-platform/api-doc-parser",
"version": "0.16.3",
"version": "0.16.4",
"description": "Transform an API documentation (Hydra, OpenAPI, GraphQL) in an intermediate representation that can be used for various tasks such as creating smart API clients, scaffolding code or building administration interfaces.",

@@ -5,0 +5,0 @@ "files": [

@@ -247,2 +247,3 @@ import jsonld from "jsonld";

) as ExpandedRdfProperty | undefined;
if (!property) {

@@ -252,2 +253,15 @@ continue;

const url = get(entrypoint, `[0]["${property["@id"]}"][0]["@id"]`) as
| string
| undefined;
if (!url) {
console.error(
new Error(
`Unable to find the URL for "${property["@id"]}" in the entrypoint, make sure your API resource has at least one GET collection operation declared.`
)
);
continue;
}
// Add fields

@@ -440,11 +454,2 @@ const relatedClass = findRelatedClass(docs, property);

const url = get(entrypoint, `[0]["${property["@id"]}"][0]["@id"]`) as
| string
| undefined;
if (!url) {
throw new Error(
`Unable to find the URL for "${property["@id"]}" in the entrypoint, make sure your API resource has at least one GET collection operation declared.`
);
}
const resource = new Resource(

@@ -451,0 +456,0 @@ guessNameFromUrl(url, entrypointUrl),

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc