Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use ApiProperty::iris instead of ApiProperty::type #395

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions api/Dockerfile
Expand Up @@ -27,6 +27,7 @@ RUN apt-get update; \
file \
gettext \
git \
zip \
; \
rm -rf /var/lib/apt/lists/*

Expand Down
2 changes: 1 addition & 1 deletion api/src/Entity/Book.php
Expand Up @@ -120,7 +120,7 @@ class Book
#[ApiFilter(OrderFilter::class)]
#[ApiFilter(SearchFilter::class, strategy: 'i' . SearchFilterInterface::STRATEGY_PARTIAL)]
#[ApiProperty(
types: ['https://schema.org/name'],
iris: ['https://schema.org/name'],
example: 'Hyperion'
)]
#[Groups(groups: ['Book:read', 'Book:read:admin', 'Bookmark:read', 'Review:read:admin'])]
Expand Down
2 changes: 1 addition & 1 deletion api/src/Entity/User.php
Expand Up @@ -121,7 +121,7 @@ public function getUserIdentifier(): string
/**
* @see https://schema.org/name
*/
#[ApiProperty(types: ['https://schema.org/name'])]
#[ApiProperty(iris: ['https://schema.org/name'])]
#[Groups(groups: ['User:read', 'Review:read'])]
public function getName(): ?string
{
Expand Down
2 changes: 0 additions & 2 deletions compose.e2e.yaml
@@ -1,5 +1,3 @@
version: "3.8"

services:
keycloak:
environment:
Expand Down
2 changes: 0 additions & 2 deletions compose.override.yaml
@@ -1,5 +1,3 @@
version: "3.4"

# Development environment override
services:
php:
Expand Down
2 changes: 0 additions & 2 deletions compose.prod.yaml
@@ -1,5 +1,3 @@
version: "3.4"

# Production environment override
services:
php:
Expand Down
2 changes: 0 additions & 2 deletions compose.yaml
@@ -1,5 +1,3 @@
version: "3.4"

services:
php:
image: ${IMAGES_PREFIX:-}app-php
Expand Down
1 change: 0 additions & 1 deletion pwa/app/books/page.tsx
Expand Up @@ -46,7 +46,6 @@ async function getServerSideProps(query: Query, session: Session|null): Promise<
try {
const response: FetchResponse<PagedCollection<Book>> | undefined = await fetchApi(buildUriFromFilters("/books", filters), {
cache: "force-cache",
next: { revalidate: 3600 },
}, session);
if (!response?.data) {
throw new Error('Unable to retrieve data from /books.');
Expand Down
2 changes: 1 addition & 1 deletion pwa/components/admin/book/Create.tsx
@@ -1,6 +1,6 @@
import { CreateGuesser, type CreateGuesserProps } from "@api-platform/admin";

import { Form } from "../../../components/admin/book/Form";
import { Form } from "./Form";

export const Create = (props: CreateGuesserProps) => (
<CreateGuesser {...props} title="Create book">
Expand Down
4 changes: 2 additions & 2 deletions pwa/components/admin/book/Edit.tsx
@@ -1,8 +1,8 @@
import { EditGuesser, type EditGuesserProps } from "@api-platform/admin";
import { TopToolbar } from 'react-admin';

import { Form } from "../../../components/admin/book/Form";
import { ShowButton } from "../../../components/admin/book/ShowButton";
import { Form } from "./Form";
import { ShowButton } from "./ShowButton";

// @ts-ignore
const Actions = ({ data }) => (
Expand Down
4 changes: 2 additions & 2 deletions pwa/components/admin/book/Form.tsx
@@ -1,7 +1,7 @@
import { required } from "react-admin";

import { ConditionInput } from "../../../components/admin/book/ConditionInput";
import { BookInput } from "../../../components/admin/book/BookInput";
import { ConditionInput } from "./ConditionInput";
import { BookInput } from "./BookInput";

export const Form = () => (
<>
Expand Down
6 changes: 3 additions & 3 deletions pwa/components/admin/book/List.tsx
Expand Up @@ -8,9 +8,9 @@ import {
EditButton,
} from "react-admin";

import { ShowButton } from "../../../components/admin/book/ShowButton";
import { RatingField } from "../../../components/admin/review/RatingField";
import { ConditionInput } from "../../../components/admin/book/ConditionInput";
import { ShowButton } from "./ShowButton";
import { RatingField } from "../review/RatingField";
import { ConditionInput } from "./ConditionInput";

const ConditionField = (props: UseRecordContextParams) => {
const record = useRecordContext(props);
Expand Down
6 changes: 3 additions & 3 deletions pwa/components/admin/review/List.tsx
Expand Up @@ -10,9 +10,9 @@ import {
AutocompleteInput,
} from "react-admin";

import { BookField } from "../../../components/admin/review/BookField";
import { RatingField } from "../../../components/admin/review/RatingField";
import { RatingInput } from "../../../components/admin/review/RatingInput";
import { BookField } from "./BookField";
import { RatingField } from "./RatingField";
import { RatingInput } from "./RatingInput";
import { type Book } from "../../../types/Book";
import { User } from "../../../types/User";

Expand Down
4 changes: 2 additions & 2 deletions pwa/components/admin/review/Show.tsx
@@ -1,8 +1,8 @@
import { FieldGuesser, ShowGuesser, type ShowGuesserProps } from "@api-platform/admin";
import { TextField } from "react-admin";

import { RatingField } from "../../../components/admin/review/RatingField";
import { BookField } from "../../../components/admin/review/BookField";
import { RatingField } from "./RatingField";
import { BookField } from "./BookField";

export const Show = (props: ShowGuesserProps) => (
<ShowGuesser {...props} title="Show review">
Expand Down