Skip to content

Commit 289ec10

Browse files
committed
refactor: align naming
1 parent ad6fe9c commit 289ec10

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/apitypes/rest/rest.operations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
removeComponents,
2525
} from '../../utils'
2626
import type * as TYPE from './rest.types'
27-
import { HASH_FLAG, INLINE_REFS_FLAG, MESSAGE_SEVERITY, NORMALIZE_OPTIONS, ORIGINS_SYMBOL } from '../../consts'
27+
import { SEMANTIC_HASH_PROPERTY, INLINE_REFS_FLAG, MESSAGE_SEVERITY, NORMALIZE_OPTIONS, ORIGINS_SYMBOL } from '../../consts'
2828
import { asyncFunction } from '../../utils/async'
2929
import { logLongBuild, syncDebugPerformance } from '../../utils/logs'
3030
import { normalize, RefErrorType } from '@netcracker/qubership-apihub-api-unifier'
@@ -40,7 +40,7 @@ export const buildRestOperations: OperationsBuilder<OpenAPIV3.Document> = async
4040
{
4141
...NORMALIZE_OPTIONS,
4242
originsFlag: ORIGINS_SYMBOL,
43-
semanticHashProperty: HASH_FLAG,
43+
semanticHashProperty: SEMANTIC_HASH_PROPERTY,
4444
source: document.data,
4545
onRefResolveError: (message: string, _path: PropertyKey[], _ref: string, errorType: RefErrorType) =>
4646
bundlingErrorHandler([{ message, errorType }]),

src/components/deprecated.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import { BuilderContext, DeprecateItem, NotificationMessage, OperationsApiType, ResolvedOperation } from '../types'
18-
import { DEFAULT_BATCH_SIZE, HASH_FLAG, MESSAGE_SEVERITY } from '../consts'
18+
import { DEFAULT_BATCH_SIZE, SEMANTIC_HASH_PROPERTY, MESSAGE_SEVERITY } from '../consts'
1919
import { executeInBatches, isDeprecatedOperationItem, isString, keyBy } from '../utils'
2020
import { JsonPath } from '@netcracker/qubership-apihub-json-crawl'
2121
import { areDeclarationPathsEqual } from '../utils/path'
@@ -133,7 +133,7 @@ export const matchSharedComponent = (jsonPath: JsonPath): MatchResult | undefine
133133
export function calculateTolerantHash(value: Jso, notifications: NotificationMessage[]): string | undefined {
134134
try {
135135
const tolerantHash: Hash | undefined = Object.keys(value).length > 0
136-
? HASH_FLAG in value ? value[HASH_FLAG] as Hash | undefined : undefined
136+
? SEMANTIC_HASH_PROPERTY in value ? value[SEMANTIC_HASH_PROPERTY] as Hash | undefined : undefined
137137
: undefined
138138

139139
if (!tolerantHash) {

src/consts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export const SUPPORTED_FILE_FORMATS = Object.values(FILE_FORMAT)
142142

143143
export const SYNTHETIC_TITLE_FLAG = Symbol('synthetic-title')
144144
export const ORIGINS_SYMBOL = Symbol('origins')
145-
export const HASH_FLAG = Symbol('hash')
145+
export const SEMANTIC_HASH_PROPERTY = Symbol('semantic-hash')
146146
export const INLINE_REFS_FLAG = Symbol('inline-refs')
147147

148148
export const NORMALIZE_OPTIONS: NormalizeOptions = {

0 commit comments

Comments
 (0)