catalog-model: rename parse/stringifyLocationRef

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-02-11 17:11:10 +01:00
parent d3292ab1ba
commit 216725b434
17 changed files with 139 additions and 73 deletions
@@ -21,7 +21,7 @@ import {
SOURCE_LOCATION_ANNOTATION,
serializeEntityRef,
Entity,
parseLocationReference,
parseLocationRef,
} from '@backstage/catalog-model';
import { TodoReader } from '../lib';
import { ListTodosRequest, ListTodosResponse, TodoService } from './types';
@@ -130,7 +130,7 @@ export class TodoReaderService implements TodoService {
const sourceLocation =
entity.metadata.annotations?.[SOURCE_LOCATION_ANNOTATION];
if (sourceLocation) {
const parsed = parseLocationReference(sourceLocation);
const parsed = parseLocationRef(sourceLocation);
if (parsed.type !== 'url') {
throw new InputError(
`Invalid entity source location type for ${serializeEntityRef(
@@ -143,7 +143,7 @@ export class TodoReaderService implements TodoService {
const location = entity.metadata.annotations?.[LOCATION_ANNOTATION];
if (location) {
const parsed = parseLocationReference(location);
const parsed = parseLocationRef(location);
if (parsed.type !== 'url') {
throw new InputError(
`Invalid entity location type for ${serializeEntityRef(