Skip to content

Commit b9dbd96

Browse files
committed
🚧 chore: fix patches and add Dockerfile
Add Dockerfile to build container that could be used in other sdk builder. The rationnals is that each sdk should patch openapi spec for their own benefits. Fix no date-time patch to remove format in array as well.
1 parent 306f352 commit b9dbd96

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

hacks/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM ruby:3.3-slim
2+
3+
WORKDIR /usr/src/app
4+
5+
COPY ./patch.rb .
6+
7+
CMD [ "./patch.rb" ]

hacks/patch.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ def patch_no_datetime(arg_info)
3333
# Remove date-time to make it fallback to string
3434
if arg_info["format"] == "date-time" then
3535
arg_info.delete("format")
36+
elsif arg_info.key?("items") and arg_info["items"]["format"] == "date-time" then
37+
arg_info["items"].delete("format")
3638
end
3739

3840
return arg_info
@@ -42,6 +44,8 @@ def patch_no_date(arg_info)
4244
# Remove date to make it fallback to string
4345
if arg_info["format"] == "date" then
4446
arg_info.delete("format")
47+
elsif arg_info.key?("items") and arg_info["items"]["format"] == "date" then
48+
arg_info["items"].delete("format")
4549
end
4650

4751
return arg_info

0 commit comments

Comments
 (0)