api-platform / admin

A beautiful and fully-featured administration interface builder for hypermedia APIs
https://api-platform.com/docs/admin/
MIT License
481 stars 130 forks source link

TS error when using HydraAdmin #429

Closed anjeylink closed 2 years ago

anjeylink commented 2 years ago

API Platform version(s) affected: 2.8.0

Description
Not possible to use HydraAdmin component because it has TS required properties schemaAnalyzer, includeDeprecated, which in reality are optional.

Code example from README won't work because TS throws an error "missing the following properties from type 'Pick ': schemaAnalyzer, includeDeprecated"

import { render } from 'react-dom';
import { HydraAdmin } from '@api-platform/admin';

const Admin = () => <HydraAdmin entrypoint="https://demo.api-platform.com" />; // Replace with your own API entrypoint

render(<Admin />, document.getElementById('root'));
alanpoulain commented 2 years ago

Thanks for reporting this!