Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -225,20 +225,23 @@ const props = defineProps({
/** Whether to expand partial in config */
expandPartial: {
type: Boolean,
default: true,
default: false,
},
})

const { i18n: { t } } = composables.useI18n()
const pluginMetaData = composables.usePluginMetaData()
const { setFieldType } = composables.usePluginHelpers()
const { getPropValue } = useHelpers()

// only expand partials if the schema supports it or if the expandPartial prop is set to true
const supportPartials = computed(() => {
return Object.keys(schema.value?.supported_partials || {}).some(key => key === 'redis-ce' || key === 'redis-ee') || props.expandPartial
})
const fetchUrl = computed<string>(
() => endpoints.item[props.config.app]?.[props.scopedEntityType ? 'forEntity' : 'all']
.replace(/{entityType}/gi, props.scopedEntityType)
.replace(/{entityId}/gi, props.scopedEntityId)
.concat(props.expandPartial ? '?expand_partials=true' : ''),
.concat(supportPartials.value ? '?expand_partials=true' : ''),
)

// schema for the basic properties
Expand Down
Loading