mirror of
https://github.com/LukeHagar/openapi-types.git
synced 2025-12-06 04:20:29 +00:00
Refactor OpenAPI schema exports for versions 2.0, 3.0, 3.1, and 3.2 to improve organization and clarity. Adjust import and export statements for component schemas, ensuring consistent structure across all versions. This update enhances maintainability and aligns with best practices for schema management.
This commit is contained in:
@@ -5,20 +5,19 @@
|
||||
* These schemas can be used to validate OpenAPI 2.0 documents and components.
|
||||
*/
|
||||
|
||||
export { default as specification } from "./main/specification.json";
|
||||
|
||||
export { default as parameter } from "./components/parameter.json";
|
||||
export { default as pathitem } from "./components/pathitem.json";
|
||||
// Component schemas
|
||||
export { default as response } from "./components/response.json";
|
||||
export { default as parameter } from "./components/parameter.json";
|
||||
export { default as schema } from "./components/schema.json";
|
||||
export { default as pathitem } from "./components/pathitem.json";
|
||||
export { default as specification } from "./main/specification.json";
|
||||
|
||||
import parameter from "./components/parameter.json";
|
||||
import pathitem from "./components/pathitem.json";
|
||||
import response from "./components/response.json";
|
||||
import schema from "./components/schema.json";
|
||||
// Import all schemas for internal use
|
||||
import specification from "./main/specification.json";
|
||||
import response from "./components/response.json";
|
||||
import parameter from "./components/parameter.json";
|
||||
import schema from "./components/schema.json";
|
||||
import pathitem from "./components/pathitem.json";
|
||||
|
||||
// Re-export all schemas as a single object for convenience
|
||||
export const schemas = {
|
||||
|
||||
@@ -5,32 +5,31 @@
|
||||
* These schemas can be used to validate OpenAPI 3.0 documents and components.
|
||||
*/
|
||||
|
||||
export { default as specification } from "./main/specification.json";
|
||||
|
||||
export { default as callback } from "./components/callback.json";
|
||||
export { default as example } from "./components/example.json";
|
||||
export { default as header } from "./components/header.json";
|
||||
export { default as link } from "./components/link.json";
|
||||
export { default as parameter } from "./components/parameter.json";
|
||||
export { default as pathitem } from "./components/pathitem.json";
|
||||
export { default as requestbody } from "./components/requestbody.json";
|
||||
// Component schemas
|
||||
export { default as response } from "./components/response.json";
|
||||
export { default as link } from "./components/link.json";
|
||||
export { default as requestbody } from "./components/requestbody.json";
|
||||
export { default as example } from "./components/example.json";
|
||||
export { default as parameter } from "./components/parameter.json";
|
||||
export { default as schema } from "./components/schema.json";
|
||||
export { default as securityscheme } from "./components/securityscheme.json";
|
||||
export { default as header } from "./components/header.json";
|
||||
export { default as callback } from "./components/callback.json";
|
||||
export { default as pathitem } from "./components/pathitem.json";
|
||||
export { default as specification } from "./main/specification.json";
|
||||
|
||||
// Import all schemas for internal use
|
||||
import specification from "./main/specification.json";
|
||||
import response from "./components/response.json";
|
||||
import link from "./components/link.json";
|
||||
import requestbody from "./components/requestbody.json";
|
||||
import callback from "./components/callback.json";
|
||||
import example from "./components/example.json";
|
||||
import header from "./components/header.json";
|
||||
import link from "./components/link.json";
|
||||
import parameter from "./components/parameter.json";
|
||||
import pathitem from "./components/pathitem.json";
|
||||
import requestbody from "./components/requestbody.json";
|
||||
import response from "./components/response.json";
|
||||
import schema from "./components/schema.json";
|
||||
import securityscheme from "./components/securityscheme.json";
|
||||
import header from "./components/header.json";
|
||||
import callback from "./components/callback.json";
|
||||
import pathitem from "./components/pathitem.json";
|
||||
// Import all schemas for internal use
|
||||
import specification from "./main/specification.json";
|
||||
|
||||
// Re-export all schemas as a single object for convenience
|
||||
export const schemas = {
|
||||
|
||||
@@ -5,32 +5,31 @@
|
||||
* These schemas can be used to validate OpenAPI 3.1 documents and components.
|
||||
*/
|
||||
|
||||
export { default as specification } from "./main/specification.json";
|
||||
|
||||
export { default as callback } from "./components/callback.json";
|
||||
export { default as example } from "./components/example.json";
|
||||
export { default as header } from "./components/header.json";
|
||||
export { default as link } from "./components/link.json";
|
||||
export { default as parameter } from "./components/parameter.json";
|
||||
export { default as pathitem } from "./components/pathitem.json";
|
||||
export { default as requestbody } from "./components/requestbody.json";
|
||||
// Component schemas
|
||||
export { default as response } from "./components/response.json";
|
||||
export { default as link } from "./components/link.json";
|
||||
export { default as requestbody } from "./components/requestbody.json";
|
||||
export { default as example } from "./components/example.json";
|
||||
export { default as parameter } from "./components/parameter.json";
|
||||
export { default as schema } from "./components/schema.json";
|
||||
export { default as securityscheme } from "./components/securityscheme.json";
|
||||
export { default as header } from "./components/header.json";
|
||||
export { default as callback } from "./components/callback.json";
|
||||
export { default as pathitem } from "./components/pathitem.json";
|
||||
export { default as specification } from "./main/specification.json";
|
||||
|
||||
// Import all schemas for internal use
|
||||
import specification from "./main/specification.json";
|
||||
import response from "./components/response.json";
|
||||
import link from "./components/link.json";
|
||||
import requestbody from "./components/requestbody.json";
|
||||
import callback from "./components/callback.json";
|
||||
import example from "./components/example.json";
|
||||
import header from "./components/header.json";
|
||||
import link from "./components/link.json";
|
||||
import parameter from "./components/parameter.json";
|
||||
import pathitem from "./components/pathitem.json";
|
||||
import requestbody from "./components/requestbody.json";
|
||||
import response from "./components/response.json";
|
||||
import schema from "./components/schema.json";
|
||||
import securityscheme from "./components/securityscheme.json";
|
||||
import header from "./components/header.json";
|
||||
import callback from "./components/callback.json";
|
||||
import pathitem from "./components/pathitem.json";
|
||||
// Import all schemas for internal use
|
||||
import specification from "./main/specification.json";
|
||||
|
||||
// Re-export all schemas as a single object for convenience
|
||||
export const schemas = {
|
||||
|
||||
@@ -5,34 +5,33 @@
|
||||
* These schemas can be used to validate OpenAPI 3.2 documents and components.
|
||||
*/
|
||||
|
||||
export { default as specification } from "./main/specification.json";
|
||||
|
||||
export { default as callback } from "./components/callback.json";
|
||||
export { default as example } from "./components/example.json";
|
||||
export { default as header } from "./components/header.json";
|
||||
export { default as link } from "./components/link.json";
|
||||
export { default as mediatype } from "./components/mediatype.json";
|
||||
export { default as parameter } from "./components/parameter.json";
|
||||
export { default as pathitem } from "./components/pathitem.json";
|
||||
export { default as requestbody } from "./components/requestbody.json";
|
||||
// Component schemas
|
||||
export { default as response } from "./components/response.json";
|
||||
export { default as link } from "./components/link.json";
|
||||
export { default as requestbody } from "./components/requestbody.json";
|
||||
export { default as example } from "./components/example.json";
|
||||
export { default as parameter } from "./components/parameter.json";
|
||||
export { default as schema } from "./components/schema.json";
|
||||
export { default as mediatype } from "./components/mediatype.json";
|
||||
export { default as securityscheme } from "./components/securityscheme.json";
|
||||
export { default as header } from "./components/header.json";
|
||||
export { default as callback } from "./components/callback.json";
|
||||
export { default as pathitem } from "./components/pathitem.json";
|
||||
export { default as specification } from "./main/specification.json";
|
||||
|
||||
import callback from "./components/callback.json";
|
||||
import example from "./components/example.json";
|
||||
import header from "./components/header.json";
|
||||
import link from "./components/link.json";
|
||||
import mediatype from "./components/mediatype.json";
|
||||
import parameter from "./components/parameter.json";
|
||||
import pathitem from "./components/pathitem.json";
|
||||
import requestbody from "./components/requestbody.json";
|
||||
import response from "./components/response.json";
|
||||
import schema from "./components/schema.json";
|
||||
import securityscheme from "./components/securityscheme.json";
|
||||
// Import all schemas for internal use
|
||||
import specification from "./main/specification.json";
|
||||
import response from "./components/response.json";
|
||||
import link from "./components/link.json";
|
||||
import requestbody from "./components/requestbody.json";
|
||||
import example from "./components/example.json";
|
||||
import parameter from "./components/parameter.json";
|
||||
import schema from "./components/schema.json";
|
||||
import mediatype from "./components/mediatype.json";
|
||||
import securityscheme from "./components/securityscheme.json";
|
||||
import header from "./components/header.json";
|
||||
import callback from "./components/callback.json";
|
||||
import pathitem from "./components/pathitem.json";
|
||||
|
||||
// Re-export all schemas as a single object for convenience
|
||||
export const schemas = {
|
||||
|
||||
Reference in New Issue
Block a user