rails_routes_to_openapi 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4563b8b80ce8a8552e65f69921ba983f1b1d37ae7ab79f99fbe698c098b966dc
|
4
|
+
data.tar.gz: e41335c9d4337ce20117a17191c2da5b0aaae15527ed26992c1ffcc02e2f01fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ec8476c18ec6b77fdd400615fdc5903e8714cab4e9bcdd4ed53b54cbb12d015ba9856fcdf137d1780a0b7134fbd0f0c88c0e3381ee45fc73127df95211bf41c
|
7
|
+
data.tar.gz: 5131e6b31ba09cd5623972159b24c134b3c97716f90e77ce069750eac0671946c8a1724acd09ca92e8fa6f138c4a04874ca845c0b5f522ffe87de8d732f2dd7b
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# Converting
|
1
|
+
# Converting Rails Routes Output into OpenAPI v3.1
|
2
2
|
|
3
|
-
In an effort to learn a little bit about Ruby and Rails, I decided a fun project would be to attempt generating a YAML file that aligns with the OpenAPI v3.1.0 specification. This file can then be imported into Postman so you can test Rails routes without manually using the Rails console or the consuming frontend application.
|
3
|
+
In an effort to learn a little bit about Ruby and Rails, I decided a fun project would be to attempt generating a YAML file that aligns with the [OpenAPI v3.1.0 specification](https://spec.openapis.org/oas/v3.1.1.html). This file can then be imported into [Postman](https://www.postman.com/) so you can test Rails routes without manually using the Rails console or the consuming frontend application.
|
4
4
|
|
5
5
|
## Quick Start
|
6
6
|
|
@@ -24,7 +24,8 @@ bundle exec rake routes_to_openapi:convert
|
|
24
24
|
|
25
25
|
This task will internally run `rails routes` on your Rails application and generate an OpenAPI YAML file named similar to `openapi_v3.1_YYYYMMDDHHMMSS.yml` in the project root.
|
26
26
|
|
27
|
-
> [!WARNING]
|
27
|
+
> [!WARNING]
|
28
|
+
> **Tip:** Ensure you run the task within a Rails project context so that it can properly pull the routes.
|
28
29
|
|
29
30
|
## Workflow Overview
|
30
31
|
|
@@ -53,7 +54,7 @@ Below is an abbreviated snippet of what the output might look like:
|
|
53
54
|
openapi: 3.1.0
|
54
55
|
info:
|
55
56
|
title: Rails Routes to OpenAPI
|
56
|
-
description: Generate an OpenAPI v3.1 YAML file
|
57
|
+
description: Generate an OpenAPI v3.1 YAML file
|
57
58
|
version: "1.1.0"
|
58
59
|
servers:
|
59
60
|
- url: "https://api.example.com"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_routes_to_openapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Camel Chang
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-02-
|
11
|
+
date: 2025-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-types
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
description: A gem to convert Rails routes to OpenAPI YAML
|
69
|
+
description: A gem to convert Rails routes to OpenAPI v3.1 YAML
|
70
70
|
email:
|
71
71
|
- a556622821@gmail.com
|
72
72
|
executables: []
|