MCPcopy Create free account
hub / github.com/alephdata/aleph / toApiFormat

Method toApiFormat

ui/src/components/MappingEditor/MappingList.js:270–286  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

268 }
269
270 toApiFormat() {
271 const query = {};
272
273 this.mappingItems.forEach(({ id, schema, properties }) => {
274 const queryItem = {
275 schema: schema.name,
276 keys: this.getMappingKeys(id),
277 properties,
278 };
279 if (!schema?.isThing()) {
280 queryItem.key_literal = schema.name;
281 }
282 query[id] = queryItem;
283 });
284
285 return query;
286 }
287
288 static fromApiFormat(model, mappingData) {
289 return new MappingList(model, mappingData);

Callers 2

formatMappingsMethod · 0.80
exportMappingDataMethod · 0.80

Calls 1

getMappingKeysMethod · 0.95

Tested by

no test coverage detected