Skip to content

Commit

Permalink
fix merge conflicts`
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi committed Sep 17, 2024
1 parent e659388 commit 7b4ae37
Show file tree
Hide file tree
Showing 66 changed files with 185,507 additions and 618,322 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ export interface PrimitiveSchemaWithExample
extends FernOpenapiIr.WithDescription,
FernOpenapiIr.WithName,
FernOpenapiIr.WithSdkGroupName,
<<<<<<< HEAD
FernOpenapiIr.WithSchemaId,
FernOpenapiIr.WithAvailability,
FernOpenapiIr.WithTitle {
=======
FernOpenapiIr.WithAvailability {
>>>>>>> cafb0600e0 (not fully working)
schema: FernOpenapiIr.PrimitiveSchemaValueWithExample;
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,7 @@ export const ArraySchema: core.serialization.ObjectSchema<serializers.ArraySchem
.extend(WithTitle);

export declare namespace ArraySchema {
<<<<<<< HEAD
interface Raw
extends WithDescription.Raw,
WithName.Raw,
WithSchemaId.Raw,
WithSdkGroupName.Raw,
WithAvailability.Raw,
WithTitle.Raw {
=======
interface Raw extends WithDescription.Raw, WithName.Raw, WithSdkGroupName.Raw, WithAvailability.Raw {
>>>>>>> cafb0600e0 (not fully working)
interface Raw extends WithDescription.Raw, WithName.Raw, WithSdkGroupName.Raw, WithAvailability.Raw, WithTitle.Raw {
value: serializers.Schema.Raw;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,7 @@ export const LiteralSchema: core.serialization.ObjectSchema<
.extend(WithTitle);

export declare namespace LiteralSchema {
<<<<<<< HEAD
interface Raw
extends WithDescription.Raw,
WithName.Raw,
WithSchemaId.Raw,
WithSdkGroupName.Raw,
WithAvailability.Raw,
WithTitle.Raw {
=======
interface Raw extends WithDescription.Raw, WithName.Raw, WithSdkGroupName.Raw, WithAvailability.Raw {
>>>>>>> cafb0600e0 (not fully working)
interface Raw extends WithDescription.Raw, WithName.Raw, WithSdkGroupName.Raw, WithAvailability.Raw, WithTitle.Raw {
value: LiteralSchemaValue.Raw;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,7 @@ export const NullableSchema: core.serialization.ObjectSchema<
.extend(WithTitle);

export declare namespace NullableSchema {
<<<<<<< HEAD
interface Raw
extends WithDescription.Raw,
WithName.Raw,
WithSchemaId.Raw,
WithSdkGroupName.Raw,
WithAvailability.Raw,
WithTitle.Raw {
=======
interface Raw extends WithDescription.Raw, WithName.Raw, WithSdkGroupName.Raw, WithAvailability.Raw {
>>>>>>> cafb0600e0 (not fully working)
interface Raw extends WithDescription.Raw, WithName.Raw, WithSdkGroupName.Raw, WithAvailability.Raw, WithTitle.Raw {
value: serializers.Schema.Raw;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,7 @@ export const OptionalSchema: core.serialization.ObjectSchema<
.extend(WithTitle);

export declare namespace OptionalSchema {
<<<<<<< HEAD
interface Raw
extends WithDescription.Raw,
WithName.Raw,
WithSchemaId.Raw,
WithSdkGroupName.Raw,
WithAvailability.Raw,
WithTitle.Raw {
=======
interface Raw extends WithDescription.Raw, WithName.Raw, WithSdkGroupName.Raw, WithAvailability.Raw {
>>>>>>> cafb0600e0 (not fully working)
interface Raw extends WithDescription.Raw, WithName.Raw, WithSdkGroupName.Raw, WithAvailability.Raw, WithTitle.Raw {
value: serializers.Schema.Raw;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,7 @@ export const PrimitiveSchema: core.serialization.ObjectSchema<
.extend(WithTitle);

export declare namespace PrimitiveSchema {
<<<<<<< HEAD
interface Raw
extends WithDescription.Raw,
WithSchemaId.Raw,
WithName.Raw,
WithSdkGroupName.Raw,
WithAvailability.Raw,
WithTitle.Raw {
=======
interface Raw extends WithDescription.Raw, WithName.Raw, WithSdkGroupName.Raw, WithAvailability.Raw {
>>>>>>> cafb0600e0 (not fully working)
interface Raw extends WithDescription.Raw, WithName.Raw, WithSdkGroupName.Raw, WithAvailability.Raw, WithTitle.Raw {
schema: PrimitiveSchemaValue.Raw;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,7 @@ export const ArraySchemaWithExample: core.serialization.ObjectSchema<
.extend(WithTitle);

export declare namespace ArraySchemaWithExample {
<<<<<<< HEAD
interface Raw
extends WithSdkGroupName.Raw,
WithSchemaId.Raw,
WithName.Raw,
WithDescription.Raw,
WithAvailability.Raw,
WithTitle.Raw {
=======
interface Raw extends WithSdkGroupName.Raw, WithName.Raw, WithDescription.Raw, WithAvailability.Raw {
>>>>>>> cafb0600e0 (not fully working)
interface Raw extends WithSdkGroupName.Raw, WithName.Raw, WithDescription.Raw, WithAvailability.Raw, WithTitle.Raw {
value: serializers.SchemaWithExample.Raw;
example?: unknown[] | null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,7 @@ export const NullableSchemaWithExample: core.serialization.ObjectSchema<
.extend(WithTitle);

export declare namespace NullableSchemaWithExample {
<<<<<<< HEAD
interface Raw
extends WithSdkGroupName.Raw,
WithSchemaId.Raw,
WithName.Raw,
WithDescription.Raw,
WithAvailability.Raw,
WithTitle.Raw {
=======
interface Raw extends WithSdkGroupName.Raw, WithName.Raw, WithDescription.Raw, WithAvailability.Raw {
>>>>>>> cafb0600e0 (not fully working)
interface Raw extends WithSdkGroupName.Raw, WithName.Raw, WithDescription.Raw, WithAvailability.Raw, WithTitle.Raw {
value: serializers.SchemaWithExample.Raw;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,7 @@ export const OptionalSchemaWithExample: core.serialization.ObjectSchema<
.extend(WithTitle);

export declare namespace OptionalSchemaWithExample {
<<<<<<< HEAD
interface Raw
extends WithSdkGroupName.Raw,
WithSchemaId.Raw,
WithName.Raw,
WithDescription.Raw,
WithAvailability.Raw,
WithTitle.Raw {
=======
interface Raw extends WithSdkGroupName.Raw, WithName.Raw, WithDescription.Raw, WithAvailability.Raw {
>>>>>>> cafb0600e0 (not fully working)
interface Raw extends WithSdkGroupName.Raw, WithName.Raw, WithDescription.Raw, WithAvailability.Raw, WithTitle.Raw {
value: serializers.SchemaWithExample.Raw;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,11 @@ export const PrimitiveSchemaWithExample: core.serialization.ObjectSchema<
.extend(WithDescription)
.extend(WithName)
.extend(WithSdkGroupName)
<<<<<<< HEAD
.extend(WithSchemaId)
.extend(WithAvailability)
.extend(WithTitle);

export declare namespace PrimitiveSchemaWithExample {
interface Raw
extends WithDescription.Raw,
WithName.Raw,
WithSdkGroupName.Raw,
WithSchemaId.Raw,
WithAvailability.Raw,
WithTitle.Raw {
=======
.extend(WithAvailability);

export declare namespace PrimitiveSchemaWithExample {
interface Raw extends WithDescription.Raw, WithName.Raw, WithSdkGroupName.Raw, WithAvailability.Raw {
>>>>>>> cafb0600e0 (not fully working)
interface Raw extends WithDescription.Raw, WithName.Raw, WithSdkGroupName.Raw, WithAvailability.Raw, WithTitle.Raw {
schema: PrimitiveSchemaValueWithExample.Raw;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,7 @@ export const UnknownSchemaWithExample: core.serialization.ObjectSchema<
.extend(WithTitle);

export declare namespace UnknownSchemaWithExample {
<<<<<<< HEAD
interface Raw
extends WithSdkGroupName.Raw,
WithSchemaId.Raw,
WithName.Raw,
WithDescription.Raw,
WithAvailability.Raw,
WithTitle.Raw {
=======
interface Raw extends WithSdkGroupName.Raw, WithName.Raw, WithDescription.Raw, WithAvailability.Raw {
>>>>>>> cafb0600e0 (not fully working)
interface Raw extends WithSdkGroupName.Raw, WithName.Raw, WithDescription.Raw, WithAvailability.Raw, WithTitle.Raw {
example?: unknown;
}
}
44 changes: 7 additions & 37 deletions packages/cli/openapi-ir-to-fern/src/buildTypeReference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,8 @@ export function buildTypeReference({
fileContainingReference: RelativeFilePath;
declarationFile?: RelativeFilePath;
context: OpenApiIrConverterContext;
<<<<<<< HEAD
}): RawSchemas.TypeReferenceWithDocsAndDisplayNameAndAvailabilitySchema {
=======
namespace: string | undefined;
}): RawSchemas.TypeReferenceWithDocsSchema {
>>>>>>> cafb0600e0 (not fully working)
}): RawSchemas.TypeReferenceWithDocsAndDisplayNameAndAvailabilitySchema {
switch (schema.type) {
case "primitive": {
return buildPrimitiveTypeReference(schema);
Expand Down Expand Up @@ -406,14 +402,9 @@ export function buildReferenceTypeReference({
schema: ReferencedSchema;
fileContainingReference: RelativeFilePath;
context: OpenApiIrConverterContext;
<<<<<<< HEAD
}): RawSchemas.TypeReferenceWithDocsAndDisplayNameAndAvailabilitySchema {
const resolvedSchema = context.getSchema(schema.schema);
=======
namespace: string | undefined;
}): RawSchemas.TypeReferenceWithDocsSchema {
}): RawSchemas.TypeReferenceWithDocsAndDisplayNameAndAvailabilitySchema {
const resolvedSchema = context.getSchema(schema.schema, namespace);
>>>>>>> cafb0600e0 (not fully working)
if (resolvedSchema == null) {
return "unknown";
}
Expand Down Expand Up @@ -450,20 +441,15 @@ export function buildArrayTypeReference({
fileContainingReference: RelativeFilePath;
declarationFile: RelativeFilePath;
context: OpenApiIrConverterContext;
<<<<<<< HEAD
}): RawSchemas.TypeReferenceWithDocsAndDisplayNameAndAvailabilitySchema {
const item = buildTypeReference({ schema: schema.value, fileContainingReference, declarationFile, context });
=======
namespace: string | undefined;
}): RawSchemas.TypeReferenceWithDocsSchema {
}): RawSchemas.TypeReferenceWithDocsAndDisplayNameAndAvailabilitySchema {
const item = buildTypeReference({
schema: schema.value,
fileContainingReference,
declarationFile,
context,
namespace
});
>>>>>>> cafb0600e0 (not fully working)
const type = `list<${getTypeFromTypeReference(item)}>`;
if (schema.description == null && schema.title == null) {
return type;
Expand All @@ -487,12 +473,8 @@ export function buildMapTypeReference({
fileContainingReference: RelativeFilePath;
declarationFile: RelativeFilePath;
context: OpenApiIrConverterContext;
<<<<<<< HEAD
}): RawSchemas.TypeReferenceWithDocsAndDisplayNameAndAvailabilitySchema {
=======
namespace: string | undefined;
}): RawSchemas.TypeReferenceWithDocsSchema {
>>>>>>> cafb0600e0 (not fully working)
}): RawSchemas.TypeReferenceWithDocsAndDisplayNameAndAvailabilitySchema {
const keyTypeReference = buildPrimitiveTypeReference(schema.key);
const valueTypeReference = buildTypeReference({
schema: schema.value,
Expand Down Expand Up @@ -535,12 +517,8 @@ export function buildOptionalTypeReference({
fileContainingReference: RelativeFilePath;
declarationFile: RelativeFilePath;
context: OpenApiIrConverterContext;
<<<<<<< HEAD
}): RawSchemas.TypeReferenceWithDocsAndDisplayNameAndAvailabilitySchema {
=======
namespace: string | undefined;
}): RawSchemas.TypeReferenceWithDocsSchema {
>>>>>>> cafb0600e0 (not fully working)
}): RawSchemas.TypeReferenceWithDocsAndDisplayNameAndAvailabilitySchema {
const itemTypeReference = buildTypeReference({
schema: schema.value,
fileContainingReference,
Expand Down Expand Up @@ -666,12 +644,8 @@ export function buildObjectTypeReference({
fileContainingReference: RelativeFilePath;
declarationFile: RelativeFilePath;
context: OpenApiIrConverterContext;
<<<<<<< HEAD
}): RawSchemas.TypeReferenceWithDocsAndDisplayNameAndAvailabilitySchema {
=======
namespace: string | undefined;
}): RawSchemas.TypeReferenceWithDocsSchema {
>>>>>>> cafb0600e0 (not fully working)
}): RawSchemas.TypeReferenceWithDocsAndDisplayNameAndAvailabilitySchema {
const objectTypeDeclaration = buildObjectTypeDeclaration({
schema,
declarationFile,
Expand Down Expand Up @@ -706,12 +680,8 @@ export function buildOneOfTypeReference({
fileContainingReference: RelativeFilePath;
declarationFile: RelativeFilePath;
context: OpenApiIrConverterContext;
<<<<<<< HEAD
}): RawSchemas.TypeReferenceWithDocsAndDisplayNameAndAvailabilitySchema {
=======
namespace: string | undefined;
}): RawSchemas.TypeReferenceWithDocsSchema {
>>>>>>> cafb0600e0 (not fully working)
}): RawSchemas.TypeReferenceWithDocsAndDisplayNameAndAvailabilitySchema {
const unionTypeDeclaration = buildOneOfTypeDeclaration({
schema,
declarationFile,
Expand Down
Loading

0 comments on commit 7b4ae37

Please sign in to comment.