Skip to content

Commit

Permalink
updating plainHTTP to plainHttp (#6943)
Browse files Browse the repository at this point in the history
# Description

-Added  changes to rename plainHTTP property to plainHttp
- updated it on typespec and generated the code and updated unit tests. 

## Type of change

<!--

Please select **one** of the following options that describes your
change and delete the others. Clearly identifying the type of change you
are making will help us review your PR faster, and is used in authoring
release notes.

If you are making a bug fix or functionality change to Radius and do not
have an associated issue link please create one now.

-->

- This pull request fixes a bug in Radius and has an approved issue
(issue link required).
- This pull request is a minor refactor, code cleanup, test improvement,
or other maintenance task and doesn't change the functionality of Radius
(issue link optional).

<!--

Please update the following to link the associated issue. This is
required for some kinds of changes (see above).

-->

Fixes: #6940

## Auto-generated summary

<!--
GitHub Copilot for docs will auto-generate a summary of the PR
-->

<!--
copilot:all
-->
### <samp>🤖[[deprecated]](https://githubnext.com/copilot-for-prs-sunset)
Generated by Copilot at 431e72a</samp>

### Summary
🔧🔄📝

<!--
1. 🔧 - This emoji represents a wrench, which can symbolize fixing,
adjusting, or improving something. This emoji could be used to indicate
that the changes are meant to improve the consistency and accuracy of
the property name across different files and languages.
2. 🔄 - This emoji represents a clockwise arrow, which can symbolize
updating, refreshing, or syncing something. This emoji could be used to
indicate that the changes are meant to update the property name to match
the latest specification and schema.
3. 📝 - This emoji represents a memo, which can symbolize writing,
editing, or documenting something. This emoji could be used to indicate
that the changes are meant to edit the property name to follow the
correct spelling and casing.
-->
This pull request renames the `plainHTTP` property to `plainHttp` in
various JSON, Go, and TypeScript files that are related to Bicep and
environment recipes. This is done to ensure consistency between the
code, the JSON schema, and the OpenAPI specification.

> _We are the renegades of `plainHttp`_
> _We defy the tyranny of `plainHTTP`_
> _We align the code with the schema and the spec_
> _We are the renegades of `plainHttp`_

### Walkthrough
* Rename `plainHTTP` property to `plainHttp` in all JSON, Go,
TypeScript, and OpenAPI files to ensure consistency and alignment with
naming conventions
([link](https://github.com/radius-project/radius/pull/6943/files?diff=unified&w=0#diff-5ebcba4c29787645de8388e21ceea2cd681cab503ffab539ac282adccd2de2f1L4-R4),
[link](https://github.com/radius-project/radius/pull/6943/files?diff=unified&w=0#diff-2fc231a38ea62a42b47752ad6dff1e90a78b221b12d803073e4de8fa0f36f68aL42-R42),
[link](https://github.com/radius-project/radius/pull/6943/files?diff=unified&w=0#diff-9c2e08918bebee99736d5983565f2e44042c9c138ffb376fa6d9f6054efc0d2eL40-R40),
[link](https://github.com/radius-project/radius/pull/6943/files?diff=unified&w=0#diff-bc1502ced9e29d6d61dc028d22603e863f59a981bbc54a59879ba3177d8e62e9L426-R426),
[link](https://github.com/radius-project/radius/pull/6943/files?diff=unified&w=0#diff-bc1502ced9e29d6d61dc028d22603e863f59a981bbc54a59879ba3177d8e62e9L444-R444),
[link](https://github.com/radius-project/radius/pull/6943/files?diff=unified&w=0#diff-bc1502ced9e29d6d61dc028d22603e863f59a981bbc54a59879ba3177d8e62e9L465-R465),
[link](https://github.com/radius-project/radius/pull/6943/files?diff=unified&w=0#diff-bc1502ced9e29d6d61dc028d22603e863f59a981bbc54a59879ba3177d8e62e9L483-R483),
[link](https://github.com/radius-project/radius/pull/6943/files?diff=unified&w=0#diff-bc1502ced9e29d6d61dc028d22603e863f59a981bbc54a59879ba3177d8e62e9L3267-R3267),
[link](https://github.com/radius-project/radius/pull/6943/files?diff=unified&w=0#diff-bc1502ced9e29d6d61dc028d22603e863f59a981bbc54a59879ba3177d8e62e9L3286-R3286),
[link](https://github.com/radius-project/radius/pull/6943/files?diff=unified&w=0#diff-b9eb5dc9371937efbfc783c67791f6a4da924efc2126d841289ed88c936cc4bbL54-R54),
[link](https://github.com/radius-project/radius/pull/6943/files?diff=unified&w=0#diff-65fb01db3055625aa2990fdbaf8053f34dbb4df3f6fded4710b12bc13fdeb12aL21-R21),
[link](https://github.com/radius-project/radius/pull/6943/files?diff=unified&w=0#diff-31df6a867aea76382a87df5433b2c7d018f97461e5221da1a06810ac182f9fc7L4-R4),
[link](https://github.com/radius-project/radius/pull/6943/files?diff=unified&w=0#diff-ac35cdfa65680d5d2be2d0513a686f4651b9a41eb951d05dcd446bc927090d68L2799-R2799),
[link](https://github.com/radius-project/radius/pull/6943/files?diff=unified&w=0#diff-ac35cdfa65680d5d2be2d0513a686f4651b9a41eb951d05dcd446bc927090d68L2815-R2815),
[link](https://github.com/radius-project/radius/pull/6943/files?diff=unified&w=0#diff-ac35cdfa65680d5d2be2d0513a686f4651b9a41eb951d05dcd446bc927090d68L4756-R4756),
[link](https://github.com/radius-project/radius/pull/6943/files?diff=unified&w=0#diff-afd83699015b6426efe6ec70fcec90303e63689cef1b48839eb95d8435acd046L109-R109),
[link](https://github.com/radius-project/radius/pull/6943/files?diff=unified&w=0#diff-afd83699015b6426efe6ec70fcec90303e63689cef1b48839eb95d8435acd046L145-R145))

Signed-off-by: Vishwanath Hiremath <vhiremath@microsoft.com>
Co-authored-by: Karishma Chawla <kachawla@microsoft.com>
  • Loading branch information
vishwahiremat and kachawla authored Dec 12, 2023
1 parent ac29d40 commit 189bcef
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"templateKind": "bicep",
"templatePath": "br:localhost:8000/recipes/cosmosdb",
"plainHTTP": true,
"plainHttp": true,
"parameters": {
"throughput": {
"maxValue": 400,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"redis-recipe": {
"templateKind": "bicep",
"templatePath": "br:ghcr.io/sampleregistry/radius/recipes/rediscaches",
"plainHTTP": true
"plainHttp": true
}
},
"Applications.Dapr/stateStores":{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"parameters" : {
"throughput": 400
},
"plainHTTP":true
"plainHttp":true
},
"terraform-recipe": {
"templateKind": "terraform",
Expand Down
12 changes: 6 additions & 6 deletions pkg/corerp/api/v20231001preview/zz_generated_models_serde.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/corerp/datamodel/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type EnvironmentRecipeProperties struct {
TemplatePath string `json:"templatePath"`
TemplateVersion string `json:"templateVersion,omitempty"`
Parameters map[string]any `json:"parameters,omitempty"`
PlainHTTP bool `json:"plainHTTP,omitempty"`
PlainHTTP bool `json:"plainHttp,omitempty"`
}

// Recipe represents input properties for recipe getMetadata api.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"mongo-azure": {
"templateKind": "bicep",
"templatePath": "ghcr.io/radius-project/dev/recipes/mongodatabases/azure:1.0",
"plainHTTP": false,
"plainHttp": false,
"parameters": {
"throughput": 400
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"templateKind": "bicep",
"templatePath": "ghcr.io/radius-project/dev/recipes/functionaltest/parameters/mongodatabases/azure:1.0",
"plainHTTP": false,
"plainHttp": false,
"parameters": {
"mongodbName": {
"type" : "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2796,7 +2796,7 @@
"type": "object",
"description": "Represents Bicep recipe properties.",
"properties": {
"plainHTTP": {
"plainHttp": {
"type": "boolean",
"description": "Connect to the Bicep registry using HTTP (not-HTTPS). This should be used when the registry is known not to support HTTPS, for example in a locally-hosted registry. Defaults to false (use HTTPS/TLS)."
}
Expand All @@ -2812,7 +2812,7 @@
"type": "object",
"description": "Represents Bicep recipe properties.",
"properties": {
"plainHTTP": {
"plainHttp": {
"type": "boolean",
"description": "Connect to the Bicep registry using HTTP (not-HTTPS). This should be used when the registry is known not to support HTTPS, for example in a locally-hosted registry. Defaults to false (use HTTPS/TLS)."
}
Expand Down Expand Up @@ -4753,7 +4753,7 @@
"description": "The key/value parameters to pass to the recipe template at deployment.",
"properties": {}
},
"plainHTTP": {
"plainHttp": {
"type": "boolean",
"description": "Connect to the Bicep registry using HTTP (not-HTTPS). This should be used when the registry is known not to support HTTPS, for example in a locally-hosted registry. Defaults to false (use HTTPS/TLS)."
}
Expand Down
4 changes: 2 additions & 2 deletions typespec/Applications.Core/environments.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ model BicepRecipeProperties extends RecipeProperties {
templateKind: "bicep";

@doc("Connect to the Bicep registry using HTTP (not-HTTPS). This should be used when the registry is known not to support HTTPS, for example in a locally-hosted registry. Defaults to false (use HTTPS/TLS).")
plainHTTP?: boolean;
plainHttp?: boolean;
}

@doc("Represents Terraform recipe properties.")
Expand Down Expand Up @@ -142,7 +142,7 @@ model RecipeGetMetadataResponse {
parameters: {};

@doc("Connect to the Bicep registry using HTTP (not-HTTPS). This should be used when the registry is known not to support HTTPS, for example in a locally-hosted registry. Defaults to false (use HTTPS/TLS).")
plainHTTP?: boolean;
plainHttp?: boolean;
}

@armResourceOperations
Expand Down

0 comments on commit 189bcef

Please sign in to comment.