All Downloads are FREE. Search and download functionalities are using the official Maven repository.

generator.client.pagination.secondary.rest-page.md Maven / Gradle / Ivy

There is a newer version: 1.22.0
Show newest version
# Rest Page

Used to map from Rest model to Domain model

Usage:

```typescript
export class MyRepo {
  // constructor

  list(): Promise> {
    return this.rest.get>('/api/domain-object').then(toPage(toDomainObject));
  }
}

type RestDomainObject = {
  id: string;
};

const toDomainObject = (rest: RestDomainObject): DomainObject => ({
  id: rest.id,
});
```




© 2015 - 2024 Weber Informatics LLC | Privacy Policy