Daniel 2 лет назад
Родитель
Сommit
1f01bfaafc
8 измененных файлов: 37 добавлений и 21 удалений
  1. +11
    -0
      matsen-tool/fix.sh
  2. +5
    -4
      matsen-tool/src/app/app.component.html
  3. +5
    -1
      matsen-tool/src/app/app.component.ts
  4. +4
    -4
      matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200Response.ts
  5. +3
    -3
      matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200ResponseHydraSearch.ts
  6. +4
    -4
      matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200ResponseHydraView.ts
  7. +4
    -4
      matsen-tool/src/app/core/api/v1/model/apiUsersGetCollection200Response.ts
  8. +1
    -1
      matsen-tool/src/environment.ts

+ 11
- 0
matsen-tool/fix.sh Просмотреть файл

@@ -0,0 +1,11 @@
find ./src/app/core/api/v1/model -type f -exec sed -i '' -e '' -e "s/hydramember/'hydra:member'/g" {} +
find ./src/app/core/api/v1/model -type f -exec sed -i '' -e '' -e "s/hydratotalItems/'hydra:totalItems'/g" {} +
find ./src/app/core/api/v1/model -type f -exec sed -i '' -e "s/hydraview/'hydra:view'/g" {} +
find ./src/app/core/api/v1/model -type f -exec sed -i '' -e "s/hydrasearch/'hydra:search'/g" {} +
find ./src/app/core/api/v1/model -type f -exec sed -i '' -e "s/hydratemplate/'hydra:template'/g" {} +
find ./src/app/core/api/v1/model -type f -exec sed -i '' -e "s/hydravariableRepresentation/'hydra:variableRepresentation'/g" {} +
find ./src/app/core/api/v1/model -type f -exec sed -i '' -e "s/hydramapping/'hydra:mapping'/g" {} +
find ./src/app/core/api/v1/model -type f -exec sed -i '' -e "s/hydrafirst/'hydra:first'/g" {} +
find ./src/app/core/api/v1/model -type f -exec sed -i '' -e "s/hydralast/'hydra:last'/g" {} +
find ./src/app/core/api/v1/model -type f -exec sed -i '' -e "s/hydranext/'hydra:next'/g" {} +
find ./src/app/core/api/v1/model -type f -exec sed -i '' -e "s/hydraprevious/'hydra:previous'/g" {} +

+ 5
- 4
matsen-tool/src/app/app.component.html Просмотреть файл

@@ -2,10 +2,11 @@
<app-login></app-login>
<ul>
<li>Posts</li>
<!-- <li *ngFor="let post of posts">-->
<!-- <h2>{{post.id}} - {{post.owner}}</h2>-->
<!-- <p>{{post.message}}</p>-->
<!-- </li>-->
<li *ngFor="let post of posts">

<h2>{{post.id}} - {{post.owner}}</h2>
<p>{{post.message}}</p>
</li>
</ul>

<router-outlet></router-outlet>

+ 5
- 1
matsen-tool/src/app/app.component.ts Просмотреть файл

@@ -8,6 +8,7 @@ import {Observable, Subscription} from "rxjs";
styleUrl: './app.component.scss'
})
export class AppComponent implements OnInit{

title = 'matsen-tool';
protected postSub: Subscription;
protected posts: Array<PostJsonld>;
@@ -18,11 +19,14 @@ export class AppComponent implements OnInit{
}

ngOnInit(): void {

this.postSub = this.postService.postsGetCollection().subscribe(
data => {

this.posts = data.hydramember;
console.log(data);
//myVariable['my:prop:name' as keyof MyModel]
this.posts = data["hydra:member"];
console.log(this.posts);
}
);



+ 4
- 4
matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200Response.ts Просмотреть файл

@@ -15,9 +15,9 @@ import { ApiPostsGetCollection200ResponseHydraView } from './apiPostsGetCollecti


export interface ApiPostsGetCollection200Response {
hydramember: Array<PostJsonld>;
hydratotalItems?: number;
hydraview?: ApiPostsGetCollection200ResponseHydraView;
hydrasearch?: ApiPostsGetCollection200ResponseHydraSearch;
'hydra:member': Array<PostJsonld>;
'hydra:totalItems'?: number;
'hydra:view'?: ApiPostsGetCollection200ResponseHydraView;
'hydra:search'?: ApiPostsGetCollection200ResponseHydraSearch;
}


+ 3
- 3
matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200ResponseHydraSearch.ts Просмотреть файл

@@ -14,8 +14,8 @@ import { ApiPostsGetCollection200ResponseHydraSearchHydraMappingInner } from './

export interface ApiPostsGetCollection200ResponseHydraSearch {
type?: string;
hydratemplate?: string;
hydravariableRepresentation?: string;
hydramapping?: Array<ApiPostsGetCollection200ResponseHydraSearchHydraMappingInner>;
'hydra:template'?: string;
'hydra:variableRepresentation'?: string;
'hydra:mapping'?: Array<ApiPostsGetCollection200ResponseHydraSearchHydraMappingInner>;
}


+ 4
- 4
matsen-tool/src/app/core/api/v1/model/apiPostsGetCollection200ResponseHydraView.ts Просмотреть файл

@@ -14,9 +14,9 @@
export interface ApiPostsGetCollection200ResponseHydraView {
id?: string;
type?: string;
hydrafirst?: string;
hydralast?: string;
hydraprevious?: string;
hydranext?: string;
'hydra:first'?: string;
'hydra:last'?: string;
'hydra:previous'?: string;
'hydra:next'?: string;
}


+ 4
- 4
matsen-tool/src/app/core/api/v1/model/apiUsersGetCollection200Response.ts Просмотреть файл

@@ -15,9 +15,9 @@ import { ApiPostsGetCollection200ResponseHydraView } from './apiPostsGetCollecti


export interface ApiUsersGetCollection200Response {
hydramember: Array<UserJsonld>;
hydratotalItems?: number;
hydraview?: ApiPostsGetCollection200ResponseHydraView;
hydrasearch?: ApiPostsGetCollection200ResponseHydraSearch;
'hydra:member': Array<UserJsonld>;
'hydra:totalItems'?: number;
'hydra:view'?: ApiPostsGetCollection200ResponseHydraView;
'hydra:search'?: ApiPostsGetCollection200ResponseHydraSearch;
}


+ 1
- 1
matsen-tool/src/environment.ts Просмотреть файл

@@ -1,5 +1,5 @@
export const environment = {
production: false,
// basePath: 'https://matsen-tool-be.ddev.site:8443',
basePath: 'https://127.0.0.1:49858',
basePath: 'https://matsen-tool-be.ddev.site:8443',
};

Загрузка…
Отмена
Сохранить