Fix unauthorized error handling (#6835)
from @BOHEUS comments in #6640 - fix bad 500 error when authentication invalid - remove "id", "createdAt", "updatedAt", etc from creation and update paths schema - improve error message - remove "id" from test body - improve secondaryLink schema description - improve depth parameter description - remove required from response body - improve examples - improve error message formatting - fix filter by position - answered to negative float position @BOHEUS comment Also: - fix secondary field openapi field description - remove schema display in playground Screenshots  
This commit is contained in:
+29
-34
@@ -1,4 +1,28 @@
|
||||
export const fetchMetadataFields = (objectNamePlural: string) => {
|
||||
const fromRelations = `
|
||||
toObjectMetadata {
|
||||
id
|
||||
dataSourceId
|
||||
nameSingular
|
||||
namePlural
|
||||
isSystem
|
||||
isRemote
|
||||
}
|
||||
toFieldMetadataId
|
||||
`;
|
||||
|
||||
const toRelations = `
|
||||
fromObjectMetadata {
|
||||
id
|
||||
dataSourceId
|
||||
nameSingular
|
||||
namePlural
|
||||
isSystem
|
||||
isRemote
|
||||
}
|
||||
fromFieldMetadataId
|
||||
`;
|
||||
|
||||
const fields = `
|
||||
type
|
||||
name
|
||||
@@ -14,26 +38,12 @@ export const fetchMetadataFields = (objectNamePlural: string) => {
|
||||
fromRelationMetadata {
|
||||
id
|
||||
relationType
|
||||
toObjectMetadata {
|
||||
id
|
||||
dataSourceId
|
||||
nameSingular
|
||||
namePlural
|
||||
isSystem
|
||||
}
|
||||
toFieldMetadataId
|
||||
${fromRelations}
|
||||
}
|
||||
toRelationMetadata {
|
||||
id
|
||||
relationType
|
||||
fromObjectMetadata {
|
||||
id
|
||||
dataSourceId
|
||||
nameSingular
|
||||
namePlural
|
||||
isSystem
|
||||
}
|
||||
fromFieldMetadataId
|
||||
${toRelations}
|
||||
}
|
||||
defaultValue
|
||||
options
|
||||
@@ -69,25 +79,10 @@ export const fetchMetadataFields = (objectNamePlural: string) => {
|
||||
return fields;
|
||||
case 'relations':
|
||||
return `
|
||||
id
|
||||
relationType
|
||||
fromObjectMetadata {
|
||||
id
|
||||
dataSourceId
|
||||
nameSingular
|
||||
namePlural
|
||||
isSystem
|
||||
}
|
||||
fromObjectMetadataId
|
||||
toObjectMetadata {
|
||||
id
|
||||
dataSourceId
|
||||
nameSingular
|
||||
namePlural
|
||||
isSystem
|
||||
}
|
||||
toObjectMetadataId
|
||||
fromFieldMetadataId
|
||||
toFieldMetadataId
|
||||
${fromRelations}
|
||||
${toRelations}
|
||||
`;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user