浏览代码

working

master
Daniel 2 年前
父节点
当前提交
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> <app-login></app-login>
<ul> <ul>
<li>Posts</li> <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> </ul>


<router-outlet></router-outlet> <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' styleUrl: './app.component.scss'
}) })
export class AppComponent implements OnInit{ export class AppComponent implements OnInit{

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


ngOnInit(): void { ngOnInit(): void {

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


this.posts = data.hydramember;
console.log(data); 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 { 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 { export interface ApiPostsGetCollection200ResponseHydraSearch {
type?: string; 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 { export interface ApiPostsGetCollection200ResponseHydraView {
id?: string; id?: string;
type?: 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 { 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 = { export const environment = {
production: false, production: false,
// basePath: 'https://matsen-tool-be.ddev.site:8443', // basePath: 'https://matsen-tool-be.ddev.site:8443',
basePath: 'https://127.0.0.1:49858',
basePath: 'https://matsen-tool-be.ddev.site:8443',
}; };

正在加载...
取消
保存