Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@kbn/openapi-generator: Support object keys which need to be surround…
…ed by quotes (elastic#172049) ## Summary ❓ Are there tests for @kbn/openapi-generator? I couldn't find them ❓ Our team had a `@timestamp` field in an API response, this caused the zod schema to break because the key was not being escaped in the object e.g: ```js export const AssetCriticalityRecord = CreateAssetCriticalityRecord.and(z.object({ // ❌ invalid JS @timestamp: z.string().datetime(), })); ``` With the fix, the `@timestamp` key is surrounded by quotes. ```js export const AssetCriticalityRecord = CreateAssetCriticalityRecord.and(z.object({ // ✅ '@timestamp': z.string().datetime(), })); ``` Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
- Loading branch information