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

openapi3-ts

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi3-ts - npm Package Compare versions

Comparing version 4.1.1 to 4.1.2

dist/dsl/openapi-builder30.d.ts

10

Changelog.md
# Changelog: openapi3-ts
## Version 4.1.2
2023.04.25
- Fix [#113](https://github.com/metadevpro/openapi3-ts/pull/113) Fix nullable on 3.0 types by @samchungy
- Fix [#116](https://github.com/metadevpro/openapi3-ts/pull/116) Export with .mjs extension by @koooge
- Fix [#117](https://github.com/metadevpro/openapi3-ts/pull/117) Support subpath for tsc with moduleResolutin node by @koooge
- Fix [#118](https://github.com/metadevpro/openapi3-ts/pull/118) Bump yaml from 2.2.1 to 2.2.2
- Update dependencies to latest.
## Version 4.1.1

@@ -4,0 +14,0 @@

42

package.json
{
"name": "openapi3-ts",
"version": "4.1.1",
"version": "4.1.2",
"description": "TS Model & utils for OpenAPI 3.x specification.",
"main": "dist/cjs/index.js",
"module": "dist/mjs/index.js",
"typings": "dist/mjs/index.d.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/mjs/index.js",
"require": "./dist/cjs/index.js"
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./oas30": {
"import": "./dist/mjs/oas30.js",
"require": "./dist/cjs/oas30.js"
"types": "./dist/oas30.d.ts",
"import": "./dist/oas30.mjs",
"require": "./dist/oas30.js"
},
"./oas31": {
"import": "./dist/mjs/oas31.js",
"require": "./dist/cjs/oas31.js"
"types": "./dist/oas31.d.ts",
"import": "./dist/oas31.mjs",
"require": "./dist/oas31.js"
}

@@ -28,6 +31,4 @@ },

"clean": "rimraf dist",
"build": "npm run build:mjs && npm run build:cjs",
"version": "node --version && npm --version && eslint --version && tsc --version && vitest --version",
"build:mjs": "tsc",
"build:cjs": "tsc -p tsconfig-cjs.json",
"build": "vite build && tsc --emitDeclarationOnly",
"version": "node --version && npm --version && eslint --version && tsc --version && vite --version && vitest --version",
"build:all": "rimraf dist && npm run lint && npm run build && npm test",

@@ -50,17 +51,18 @@ "lint": "eslint src/**/*.ts",

"dependencies": {
"yaml": "^2.2.1"
"yaml": "^2.2.2"
},
"devDependencies": {
"@types/node": "^18.15.11",
"@typescript-eslint/eslint-plugin": "^5.58.0",
"@typescript-eslint/parser": "^5.58.0",
"@types/node": "^18.16.0",
"@typescript-eslint/eslint-plugin": "^5.59.1",
"@typescript-eslint/parser": "^5.59.1",
"@vitest/coverage-c8": "^0.30.1",
"c8": "^7.13.0",
"coveralls": "^3.1.1",
"eslint": "^8.38.0",
"eslint": "^8.39.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.8.7",
"prettier": "^2.8.8",
"rimraf": "^5.0.0",
"typescript": "~5.0.4",
"vite": "^4.3.1",
"vitest": "^0.30.1",

@@ -67,0 +69,0 @@ "vitest-teamcity-reporter": "^0.1.12"

@@ -17,42 +17,26 @@ # OpenApi3-TS

### To use version 3.1
### To use version 3.1 import
From Typescript you can consume it from the library:
```typescript
```js
import { oas31 } from 'openapi3-ts';
```
Or directly named import:
Or directly import from subpath:
```typescript
```js
import { OpenAPIObject, OpenApiBuilder } from 'openapi3-ts/oas31';
```
From a JavaScript application you can import:
```javascript
import { oas31 } from 'openapi3-ts';
```
### To use version 3.0 import
From Typescript you can consume it from the library:
```typescript
```js
import { oas30 } from 'openapi3-ts';
```
Or directly named import:
Or directly import from subpath:
```typescript
```js
import { OpenAPIObject, OpenApiBuilder } from 'openapi3-ts/oas30';
```
From a JavaScript application you can import:
```javascript
import { oas30 } from 'openapi3-ts';
```
## Includes

@@ -59,0 +43,0 @@

@@ -10,3 +10,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */

export * from './oas-common';
export { ISpecificationExtension, SpecificationExtension } from './specification-extension';
export type { ISpecificationExtension, SpecificationExtension } from './specification-extension';

@@ -273,2 +273,3 @@ export interface OpenAPIObject extends ISpecificationExtension {

export interface SchemaObject extends ISpecificationExtension {
nullable?: boolean;
discriminator?: DiscriminatorObject;

@@ -275,0 +276,0 @@ readOnly?: boolean;

@@ -10,3 +10,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */

export * from './oas-common';
export { ISpecificationExtension, SpecificationExtension } from './specification-extension';
export type { ISpecificationExtension, SpecificationExtension } from './specification-extension';

@@ -13,0 +13,0 @@ export interface OpenAPIObject extends ISpecificationExtension {

/* eslint-disable @typescript-eslint/no-explicit-any */
// Suport for Specification Extensions
// Support for Specification Extensions
// as described in

@@ -5,0 +5,0 @@ // https://github.com/OAI/OpenAPI-Specification/blob/3.0.0-rc0/versions/3.0.md#specificationExtensions

export * from './dsl/openapi-builder30';
export * from './model/openapi30';
export { Server, ServerVariable } from './model/server';
export { IExtensionName, IExtensionType, ISpecificationExtension } from './model/specification-extension';
export type { IExtensionName, IExtensionType, ISpecificationExtension } from './model/specification-extension';
export * from './dsl/openapi-builder31';
export * from './model/openapi31';
export { Server, ServerVariable } from './model/server';
export { IExtensionName, IExtensionType, ISpecificationExtension } from './model/specification-extension';
export type { IExtensionName, IExtensionType, ISpecificationExtension } from './model/specification-extension';

@@ -6,3 +6,2 @@ {

"target": "ES2020",
"outDir": "dist/mjs",
"preserveConstEnums": true,

@@ -19,4 +18,4 @@ "module": "ESNext",

"strict": true,
"sourceMap": true,
"rootDir": "src",
"outDir": "dist",
"types": ["vitest/globals", "node"]

@@ -26,3 +25,3 @@ },

"compileOnSave": true,
"exclude": ["**/*.spec.ts", "bin", "dist", "vite.config.ts", "node_modules/**"]
"exclude": ["**/*.spec.ts", "bin", "dist", "test", "vite.config.ts", "node_modules/**"]
}

@@ -0,1 +1,2 @@

import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';

@@ -5,2 +6,21 @@ import TeamCityReporter from 'vitest-teamcity-reporter';

export default defineConfig({
build: {
lib: {
entry: {
index: resolve(__dirname, 'src/index.ts'),
oas30: resolve(__dirname, 'src/oas30.ts'),
oas31: resolve(__dirname, 'src/oas31.ts'),
},
name: 'OpenApi3TS',
},
rollupOptions: {
external: ['yaml'],
output: {
globals: {
yaml: 'yaml',
},
},
},
sourcemap: true,
},
test: {

@@ -7,0 +27,0 @@ environment: 'node',

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