Skip to content

Commit

Permalink
adds Orval config
Browse files Browse the repository at this point in the history
  • Loading branch information
andresgnlez committed Oct 18, 2023
1 parent 97e1a16 commit 248e386
Show file tree
Hide file tree
Showing 25 changed files with 19,437 additions and 6,723 deletions.
6 changes: 6 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

cd ./frontend && yarn types && yarn lint --fix && yarn check-types && git add src/types/generated/

cd .. && cd ./cms && yarn cs export -y
3 changes: 1 addition & 2 deletions cms/config/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module.exports = {
config: {
"x-strapi-config": {
mutateDocumentation: (generatedDocumentationDraft) => {
console.log("generatedDocumentationDraft", generatedDocumentationDraft);
Object.keys(generatedDocumentationDraft.paths).forEach((path) => {
// check if it has {id} in the path
if (path.includes("{id}")) {
Expand Down Expand Up @@ -48,4 +47,4 @@ module.exports = {
// ],
},
},
};
};
25 changes: 25 additions & 0 deletions cms/types/generated/components.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import type { Schema, Attribute } from '@strapi/strapi';

export interface DocumentationMetadata extends Schema.Component {
collectionName: 'components_documentation_metadata';
info: {
displayName: 'Metadata';
description: '';
};
attributes: {
description: Attribute.RichText & Attribute.Required;
citation: Attribute.RichText;
source: Attribute.RichText;
resolution: Attribute.String;
content_date: Attribute.Date;
license: Attribute.String;
};
}

declare module '@strapi/types' {
export module Shared {
export interface Components {
'documentation.metadata': DocumentationMetadata;
}
}
}
Loading

0 comments on commit 248e386

Please sign in to comment.