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

openapi-police

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-police - npm Package Compare versions

Comparing version 1.0.11 to 1.1.0

4

dist/parameter.d.ts

@@ -1,4 +0,4 @@

import { SchemaObject, SchemaObjectOptions } from "./schema-object";
import { SchemaObjectOptions, StaticSchemaObject } from "./schema-object";
import { OpenAPIV3 } from "./types";
export declare class ParameterObject extends SchemaObject {
export declare class ParameterObject extends StaticSchemaObject {
protected parameter: OpenAPIV3.ParameterObject;

@@ -5,0 +5,0 @@ constructor(parameter: OpenAPIV3.ParameterObject);

@@ -59,3 +59,3 @@ "use strict";

}
class ParameterObject extends schema_object_1.SchemaObject {
class ParameterObject extends schema_object_1.StaticSchemaObject {
constructor(parameter) {

@@ -62,0 +62,0 @@ super(parameter.schema || true);

@@ -8,6 +8,4 @@ import { Schema, ValidationOptions } from 'jsonpolice';

}
export declare class SchemaObject extends Schema {
protected _spec: Promise<OpenAPIV3.SchemaObject>;
constructor(schema: OpenAPIV3.SchemaObject);
spec(): Promise<OpenAPIV3.SchemaObject>;
export declare abstract class SchemaObject extends Schema {
abstract spec(): Promise<OpenAPIV3.SchemaObject>;
protected readonly validators: Set<string>;

@@ -22,1 +20,6 @@ protected coerceToType(data: string, type: string): any;

}
export declare class StaticSchemaObject extends SchemaObject {
protected _spec: OpenAPIV3.SchemaObject;
constructor(schema: OpenAPIV3.SchemaObject);
spec(): Promise<OpenAPIV3.SchemaObject>;
}

@@ -8,10 +8,2 @@ "use strict";

class SchemaObject extends jsonpolice_1.Schema {
constructor(schema) {
super();
//getMeta(schema); // throws if schema is not annotated; // TODO should I stay or should I go
this._spec = Promise.resolve(schema);
}
spec() {
return this._spec;
}
get validators() {

@@ -162,2 +154,12 @@ if (!this._validators) {

exports.SchemaObject = SchemaObject;
class StaticSchemaObject extends SchemaObject {
constructor(schema) {
super();
this._spec = schema;
}
spec() {
return Promise.resolve(this._spec);
}
}
exports.StaticSchemaObject = StaticSchemaObject;
//# sourceMappingURL=schema-object.js.map
{
"name": "openapi-police",
"version": "1.0.11",
"version": "1.1.0",
"description": "OpenAPI v3 validators and utilities",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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