UNPKG

@typespec/http-server-csharp

Version:

TypeSpec service code generator for c-sharp

43 lines 2.21 kB
import { ModelProperty, Program, Scalar, Type } from "@typespec/compiler"; import { Attribute } from "./interfaces.js"; export declare const JsonNamespace: string; export declare function getEncodingValue(program: Program, type: Scalar | ModelProperty): string | undefined; export declare function getFormatValue(program: Program, type: Scalar | ModelProperty): string | undefined; /** * Return name encoding attributes * @param program The program being processed * @param type The type to check * @returns The attributes associated with the type, or none */ export declare function getEncodedNameAttribute(program: Program, type: ModelProperty, cSharpName?: string): Attribute | undefined; /** * Return the encoding attributes for model properties * @param program The program being processed * @param type The type to check * @returns The appropriate serialization attributes for the type, or none */ export declare function getEncodingAttributes(program: Program, type: ModelProperty): Attribute[]; /** * Return min and max length attributes for string * @param program The program being processed * @param type The type to check * @returns The attributes associated with the type, or none */ export declare function getStringConstraintAttribute(program: Program, type: ModelProperty | Scalar): Attribute | undefined; /** * Return min and max length attributes for string * @param program The program being processed * @param type The type to check * @returns The attributes associated with the type, or none */ export declare function getArrayConstraintAttribute(program: Program, type: ModelProperty | Scalar): Attribute | undefined; /** * Return min and max length attributes for string * @param program The program being processed * @param type The type to check * @returns The attributes associated with the type, or none */ export declare function getNumericConstraintAttribute(program: Program, type: ModelProperty | Scalar): Attribute | undefined; export declare function getSafeIntAttribute(type: Scalar): Attribute | undefined; export declare function getAttributes(program: Program, type: Type, cSharpName?: string): Attribute[]; //# sourceMappingURL=attributes.d.ts.map