diff --git a/docs/openapi/01-getting-started.md b/docs/openapi/01-getting-started.md index 0c4f16d2ff..11c2c689e9 100644 --- a/docs/openapi/01-getting-started.md +++ b/docs/openapi/01-getting-started.md @@ -52,7 +52,7 @@ Run `yarn backstage-repo-tools package schema openapi generate --server` from th Use it like so, update your `router.ts` or `createRouter.ts` file with the following content, ```diff -+ import { createOpenApiRouter } from '../generated'; ++ import { createOpenApiRouter } from '../schema/openapi'; - import Router from 'express-promise-router'; ... @@ -67,10 +67,10 @@ export async function createRouter( From your current backend plugin directory, run `yarn backstage-repo-tools package schema openapi generate --client-package `. `` is a new directory and npm package that you should create. The general pattern is to add a new entry point to your plugin's common package, `plugins/-common/client`. You should add this command to your `package.json` for future use. -The generated client will have a directory `src/generated` that exports a `DefaultApiClient` class and all generated types. You can use the client like so, +The generated client will have a directory `src/schema/openapi/generated` that exports a `DefaultApiClient` class and all generated types. You can use the client like so, ```diff -+ import { DefaultApiClient } from './generated'; ++ import { DefaultApiClient } from '../schema/openapi/generated'; export class CatalogClient implements CatalogApi { + private readonly apiClient: DefaultApiClient; diff --git a/docs/openapi/generate-client.md b/docs/openapi/generate-client.md index 1a31758502..01e876a82a 100644 --- a/docs/openapi/generate-client.md +++ b/docs/openapi/generate-client.md @@ -20,7 +20,7 @@ info: ### Generating your client -1. Run `yarn backstage-repo-tools package schema openapi generate --client-package `. This will create a new folder in `/src/generated` to house the generated content. We recommend that the client package be your plugin's common package. You should then add a new entry point into the package so that the generated content can be accessed like so, `-common/client`. To do that, adjust your `package.json` like so, +1. Run `yarn backstage-repo-tools package schema openapi generate --client-package `. This will create a new folder in `/src/schema/openapi/generated` to house the generated content. We recommend that the client package be your plugin's common package. You should then add a new entry point into the package so that the generated content can be accessed like so, `-common/client`. To do that, adjust your `package.json` like so, ```json // ... other scripts @@ -52,6 +52,12 @@ info: // ... other stuff ``` -2. You should not need to import anything from subfolders of the `src/generated` parent folder, everything you should require will be accessible from the `src/generated/index.ts` file. Of note, +and then create a new `src/client.ts` with the following content, + +```ts name="src/client.ts" +export * from './schema/openapi/generated'; +``` + +2. You should not need to import anything from subfolders of the `src/schema/openapi/generated` parent folder, everything you should require will be accessible from the `src/schema/openapi/generated/index.ts` file. Of note, 1. `DefaultApiClient` - this is the client that you can use to access your specific spec. 1. Any request or response types - these will be available from the index and should match the names in your spec. diff --git a/packages/repo-tools/src/commands/package/schema/openapi/generate/server.ts b/packages/repo-tools/src/commands/package/schema/openapi/generate/server.ts index ae7af25afc..2525bb9f98 100644 --- a/packages/repo-tools/src/commands/package/schema/openapi/generate/server.ts +++ b/packages/repo-tools/src/commands/package/schema/openapi/generate/server.ts @@ -15,7 +15,7 @@ */ import chalk from 'chalk'; -import { resolve, dirname } from 'path'; +import { resolve, dirname, join } from 'path'; import YAML from 'js-yaml'; import { OLD_SCHEMA_PATH, @@ -38,7 +38,8 @@ async function generateSpecFile() { const tsPath = cliPaths.resolveTarget(TS_SCHEMA_PATH); - await fs.mkdirp(dirname(tsPath)); + const schemaDir = dirname(tsPath); + await fs.mkdirp(schemaDir); const oldTsPath = cliPaths.resolveTarget(OLD_SCHEMA_PATH); if (oldTsPath) { @@ -66,9 +67,16 @@ export const createOpenApiRouter = async ( `, ); - await exec(`yarn backstage-cli package lint --fix ${tsPath}`); + const indexFile = join(schemaDir, '..', 'index.ts'); + await fs.writeFile( + indexFile, + `// + export * from './generated';`, + ); + + await exec(`yarn backstage-cli package lint`, ['--fix', tsPath, indexFile]); if (await cliPaths.resolveTargetRoot('node_modules/.bin/prettier')) { - await exec(`yarn prettier`, ['--write', tsPath], { + await exec(`yarn prettier`, ['--write', tsPath, indexFile], { cwd: cliPaths.targetRoot, }); } diff --git a/packages/repo-tools/src/lib/openapi/constants.ts b/packages/repo-tools/src/lib/openapi/constants.ts index eb4b62db8f..22f52e75a9 100644 --- a/packages/repo-tools/src/lib/openapi/constants.ts +++ b/packages/repo-tools/src/lib/openapi/constants.ts @@ -16,7 +16,9 @@ export const YAML_SCHEMA_PATH = 'src/schema/openapi.yaml'; -export const TS_MODULE = 'src/generated/router'; +export const OUTPUT_PATH = 'src/schema/openapi/generated'; + +export const TS_MODULE = `${OUTPUT_PATH}/router`; export const OLD_SCHEMA_PATH = `src/schema/openapi.generated.ts`; @@ -26,8 +28,6 @@ export const GENERATOR_VERSION = `1.0.0`; export const GENERATOR_NAME = 'typescript-backstage'; export const GENERATOR_FILE = `packages/template-openapi-plugin-client/generator/target/${GENERATOR_NAME}-openapi-generator-${GENERATOR_VERSION}.jar`; -export const OUTPUT_PATH = 'src/generated'; - export const OPENAPI_IGNORE_FILES = [ // Get rid of the default files. '*.md', diff --git a/plugins/catalog-backend/src/generated/apis/DefaultApi.server.ts b/plugins/catalog-backend/src/schema/openapi/generated/apis/DefaultApi.server.ts similarity index 100% rename from plugins/catalog-backend/src/generated/apis/DefaultApi.server.ts rename to plugins/catalog-backend/src/schema/openapi/generated/apis/DefaultApi.server.ts diff --git a/plugins/catalog-backend/src/generated/apis/index.ts b/plugins/catalog-backend/src/schema/openapi/generated/apis/index.ts similarity index 100% rename from plugins/catalog-backend/src/generated/apis/index.ts rename to plugins/catalog-backend/src/schema/openapi/generated/apis/index.ts diff --git a/plugins/catalog-backend/src/generated/index.ts b/plugins/catalog-backend/src/schema/openapi/generated/index.ts similarity index 100% rename from plugins/catalog-backend/src/generated/index.ts rename to plugins/catalog-backend/src/schema/openapi/generated/index.ts diff --git a/plugins/catalog-backend/src/generated/router.ts b/plugins/catalog-backend/src/schema/openapi/generated/router.ts similarity index 100% rename from plugins/catalog-backend/src/generated/router.ts rename to plugins/catalog-backend/src/schema/openapi/generated/router.ts diff --git a/plugins/catalog-backend/src/schema/openapi/index.ts b/plugins/catalog-backend/src/schema/openapi/index.ts new file mode 100644 index 0000000000..db98243cbf --- /dev/null +++ b/plugins/catalog-backend/src/schema/openapi/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export * from './generated'; diff --git a/plugins/catalog-backend/src/service/createRouter.ts b/plugins/catalog-backend/src/service/createRouter.ts index bcf69a6825..9b62d1318d 100644 --- a/plugins/catalog-backend/src/service/createRouter.ts +++ b/plugins/catalog-backend/src/service/createRouter.ts @@ -46,7 +46,7 @@ import { locationInput, validateRequestBody, } from './util'; -import { createOpenApiRouter } from '../generated'; +import { createOpenApiRouter } from '../schema/openapi'; import { parseEntityPaginationParams } from './request/parseEntityPaginationParams'; import { AuthService, diff --git a/plugins/catalog-common/src/client.ts b/plugins/catalog-common/src/client.ts index db98243cbf..3d15650c24 100644 --- a/plugins/catalog-common/src/client.ts +++ b/plugins/catalog-common/src/client.ts @@ -14,4 +14,4 @@ * limitations under the License. */ -export * from './generated'; +export * from './schema/openapi/generated'; diff --git a/plugins/catalog-common/src/generated/apis/DefaultApi.client.ts b/plugins/catalog-common/src/schema/openapi/generated/apis/DefaultApi.client.ts similarity index 99% rename from plugins/catalog-common/src/generated/apis/DefaultApi.client.ts rename to plugins/catalog-common/src/schema/openapi/generated/apis/DefaultApi.client.ts index a450fe18c8..a466dccd8c 100644 --- a/plugins/catalog-common/src/generated/apis/DefaultApi.client.ts +++ b/plugins/catalog-common/src/schema/openapi/generated/apis/DefaultApi.client.ts @@ -36,6 +36,7 @@ import { GetEntitiesByRefsRequest } from '../models/GetEntitiesByRefsRequest.mod import { GetLocations200ResponseInner } from '../models/GetLocations200ResponseInner.model'; import { Location } from '../models/Location.model'; import { RefreshEntityRequest } from '../models/RefreshEntityRequest.model'; +import { ValidateEntity400Response } from '../models/ValidateEntity400Response.model'; import { ValidateEntityRequest } from '../models/ValidateEntityRequest.model'; /** diff --git a/plugins/catalog-common/src/generated/apis/index.ts b/plugins/catalog-common/src/schema/openapi/generated/apis/index.ts similarity index 100% rename from plugins/catalog-common/src/generated/apis/index.ts rename to plugins/catalog-common/src/schema/openapi/generated/apis/index.ts diff --git a/plugins/catalog-common/src/generated/index.ts b/plugins/catalog-common/src/schema/openapi/generated/index.ts similarity index 100% rename from plugins/catalog-common/src/generated/index.ts rename to plugins/catalog-common/src/schema/openapi/generated/index.ts diff --git a/plugins/catalog-common/src/generated/models/AnalyzeLocationEntityField.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/AnalyzeLocationEntityField.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/AnalyzeLocationEntityField.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/AnalyzeLocationEntityField.model.ts diff --git a/plugins/catalog-common/src/generated/models/AnalyzeLocationExistingEntity.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/AnalyzeLocationExistingEntity.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/AnalyzeLocationExistingEntity.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/AnalyzeLocationExistingEntity.model.ts diff --git a/plugins/catalog-common/src/generated/models/AnalyzeLocationGenerateEntity.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/AnalyzeLocationGenerateEntity.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/AnalyzeLocationGenerateEntity.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/AnalyzeLocationGenerateEntity.model.ts diff --git a/plugins/catalog-common/src/generated/models/AnalyzeLocationRequest.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/AnalyzeLocationRequest.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/AnalyzeLocationRequest.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/AnalyzeLocationRequest.model.ts diff --git a/plugins/catalog-common/src/generated/models/AnalyzeLocationResponse.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/AnalyzeLocationResponse.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/AnalyzeLocationResponse.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/AnalyzeLocationResponse.model.ts diff --git a/plugins/catalog-common/src/generated/models/CreateLocation201Response.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/CreateLocation201Response.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/CreateLocation201Response.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/CreateLocation201Response.model.ts diff --git a/plugins/catalog-common/src/generated/models/CreateLocationRequest.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/CreateLocationRequest.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/CreateLocationRequest.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/CreateLocationRequest.model.ts diff --git a/plugins/catalog-common/src/generated/models/EntitiesBatchResponse.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/EntitiesBatchResponse.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/EntitiesBatchResponse.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/EntitiesBatchResponse.model.ts diff --git a/plugins/catalog-common/src/generated/models/EntitiesQueryResponse.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/EntitiesQueryResponse.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/EntitiesQueryResponse.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/EntitiesQueryResponse.model.ts diff --git a/plugins/catalog-common/src/generated/models/EntitiesQueryResponsePageInfo.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/EntitiesQueryResponsePageInfo.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/EntitiesQueryResponsePageInfo.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/EntitiesQueryResponsePageInfo.model.ts diff --git a/plugins/catalog-common/src/generated/models/Entity.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/Entity.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/Entity.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/Entity.model.ts diff --git a/plugins/catalog-common/src/generated/models/EntityAncestryResponse.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/EntityAncestryResponse.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/EntityAncestryResponse.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/EntityAncestryResponse.model.ts diff --git a/plugins/catalog-common/src/generated/models/EntityAncestryResponseItemsInner.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/EntityAncestryResponseItemsInner.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/EntityAncestryResponseItemsInner.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/EntityAncestryResponseItemsInner.model.ts diff --git a/plugins/catalog-common/src/generated/models/EntityFacet.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/EntityFacet.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/EntityFacet.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/EntityFacet.model.ts diff --git a/plugins/catalog-common/src/generated/models/EntityFacetsResponse.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/EntityFacetsResponse.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/EntityFacetsResponse.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/EntityFacetsResponse.model.ts diff --git a/plugins/catalog-common/src/generated/models/EntityLink.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/EntityLink.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/EntityLink.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/EntityLink.model.ts diff --git a/plugins/catalog-common/src/generated/models/EntityMeta.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/EntityMeta.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/EntityMeta.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/EntityMeta.model.ts diff --git a/plugins/catalog-common/src/generated/models/EntityRelation.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/EntityRelation.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/EntityRelation.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/EntityRelation.model.ts diff --git a/plugins/catalog-common/src/generated/models/ErrorError.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/ErrorError.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/ErrorError.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/ErrorError.model.ts diff --git a/plugins/catalog-common/src/generated/models/ErrorRequest.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/ErrorRequest.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/ErrorRequest.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/ErrorRequest.model.ts diff --git a/plugins/catalog-common/src/generated/models/ErrorResponse.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/ErrorResponse.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/ErrorResponse.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/ErrorResponse.model.ts diff --git a/plugins/catalog-common/src/generated/models/GetEntitiesByRefsRequest.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/GetEntitiesByRefsRequest.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/GetEntitiesByRefsRequest.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/GetEntitiesByRefsRequest.model.ts diff --git a/plugins/catalog-common/src/generated/models/GetLocations200ResponseInner.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/GetLocations200ResponseInner.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/GetLocations200ResponseInner.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/GetLocations200ResponseInner.model.ts diff --git a/plugins/catalog-common/src/generated/models/Location.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/Location.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/Location.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/Location.model.ts diff --git a/plugins/catalog-common/src/generated/models/LocationInput.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/LocationInput.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/LocationInput.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/LocationInput.model.ts diff --git a/plugins/catalog-common/src/generated/models/LocationSpec.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/LocationSpec.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/LocationSpec.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/LocationSpec.model.ts diff --git a/plugins/catalog-common/src/generated/models/ModelError.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/ModelError.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/ModelError.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/ModelError.model.ts diff --git a/plugins/catalog-common/src/generated/models/NullableEntity.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/NullableEntity.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/NullableEntity.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/NullableEntity.model.ts diff --git a/plugins/catalog-common/src/generated/models/RecursivePartialEntity.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/RecursivePartialEntity.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/RecursivePartialEntity.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/RecursivePartialEntity.model.ts diff --git a/plugins/catalog-common/src/generated/models/RecursivePartialEntityMeta.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/RecursivePartialEntityMeta.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/RecursivePartialEntityMeta.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/RecursivePartialEntityMeta.model.ts diff --git a/plugins/catalog-common/src/generated/models/RecursivePartialEntityMetaAllOf.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/RecursivePartialEntityMetaAllOf.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/RecursivePartialEntityMetaAllOf.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/RecursivePartialEntityMetaAllOf.model.ts diff --git a/plugins/catalog-common/src/generated/models/RecursivePartialEntityRelation.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/RecursivePartialEntityRelation.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/RecursivePartialEntityRelation.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/RecursivePartialEntityRelation.model.ts diff --git a/plugins/catalog-common/src/generated/models/RefreshEntityRequest.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/RefreshEntityRequest.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/RefreshEntityRequest.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/RefreshEntityRequest.model.ts diff --git a/plugins/catalog-common/src/generated/models/ValidateEntity400Response.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/ValidateEntity400Response.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/ValidateEntity400Response.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/ValidateEntity400Response.model.ts diff --git a/plugins/catalog-common/src/generated/models/ValidateEntity400ResponseErrorsInner.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/ValidateEntity400ResponseErrorsInner.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/ValidateEntity400ResponseErrorsInner.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/ValidateEntity400ResponseErrorsInner.model.ts diff --git a/plugins/catalog-common/src/generated/models/ValidateEntityRequest.model.ts b/plugins/catalog-common/src/schema/openapi/generated/models/ValidateEntityRequest.model.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/ValidateEntityRequest.model.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/ValidateEntityRequest.model.ts diff --git a/plugins/catalog-common/src/generated/models/index.ts b/plugins/catalog-common/src/schema/openapi/generated/models/index.ts similarity index 100% rename from plugins/catalog-common/src/generated/models/index.ts rename to plugins/catalog-common/src/schema/openapi/generated/models/index.ts diff --git a/plugins/catalog-common/src/generated/pluginId.ts b/plugins/catalog-common/src/schema/openapi/generated/pluginId.ts similarity index 100% rename from plugins/catalog-common/src/generated/pluginId.ts rename to plugins/catalog-common/src/schema/openapi/generated/pluginId.ts diff --git a/plugins/catalog-common/src/generated/types/discovery.ts b/plugins/catalog-common/src/schema/openapi/generated/types/discovery.ts similarity index 100% rename from plugins/catalog-common/src/generated/types/discovery.ts rename to plugins/catalog-common/src/schema/openapi/generated/types/discovery.ts diff --git a/plugins/catalog-common/src/generated/types/fetch.ts b/plugins/catalog-common/src/schema/openapi/generated/types/fetch.ts similarity index 100% rename from plugins/catalog-common/src/generated/types/fetch.ts rename to plugins/catalog-common/src/schema/openapi/generated/types/fetch.ts